# -*- Mode: shell-script -*-
#############################################################################
##
#A  groupid.grp                 GAP group library                Frank Celler
#A                                                         & Hans-Georg Esser
##
##
#Y  Copyright (C) 2018-2021, Carnegie Mellon University
#Y  All rights reserved.  See LICENSE for details.
#Y  
#Y  This work is based on GAP version 3, with some files from version 4.  GAP is
#Y  Copyright (C) (1987--2021) by the GAP Group (www.gap-system.org).
##
##  The information in   the file is  based  on the  Neubueser Catalogue  for
##  groups of order less or equal than 100, excluding groups  of order 64 and
##  96, the Catalogue of M.Hall  and J.K.Senior for  groups of order 64,  and
##  the R.Laue Catalogue of groups of order 96.
##
##
if not IsBound(StandardPresentation)  then StandardPresentation := 0;  fi;


#############################################################################
##
#F  NrElementsOfOrder( <G>, <n> ) . .  number of elements of <G> of order <n>
##
NrElementsOfOrder := function( G, n )
    return Number( Elements(G), x -> Order(G,x) = n );
end;


#############################################################################
##
#F  EncodedStandardPresentation( <G>, <p> ) . . . . . encode pcp presentation
##
##  This is the inverse of 'ThGGroup' and 'TGGroup'.
##
EncodedStandardPresentation := function ( G, p )
    local   c,  n,  rhs,  i,  k,  enc,  mul,  l,  rank;

    # get number of generators
    c := Cgs(G);
    n := Length(c);

    # construct right hand sides of the presentation
    rhs := [];
    for i  in [ 1 .. n ]  do
        rhs[i] := [];
        rhs[i][i] := ExponentsAgWord(c[i]^p);
        for k  in [ 1 .. i-1 ]  do
            rhs[i][k] := ExponentsAgWord(Comm(c[i],c[k]));
        od;
    od;

    # encode presentation
    enc := 0;
    mul := 1;
    for i  in [ 1 .. n ]  do
        for k  in [1..i-1]  do
            for l  in [k..i-1]  do
                enc := enc + rhs[l][k][i]*mul;
                mul := mul*p;
            od;
        od;
    od;

    # get rank
    if IsBound(G.rank)  then
        rank := G.rank;
    else
        rank := LogInt( Index(G,FrattiniSubgroup(G)), p );
    fi;

    return [ rank, n, Length(PCentralSeries(G,p))-1, enc ];

end;


#############################################################################
##
#F  GroupIdOps  . . . . . . . . . . . . . . . . . . . . . . operations record
##
GroupIdOps := OperationsRecord( "GroupIdOps" );


#############################################################################
##
#V  GroupIdOps.PGroups  . . . . . . . . . . . . . .  p-group catalogue number
##
GroupIdOps.PGroups     := [];
GroupIdOps.PGroups[ 2] := [1];
GroupIdOps.PGroups[ 4] := [2,1];
GroupIdOps.PGroups[ 8] := [5,2,1,3,4];
GroupIdOps.PGroups[16] := [14,10,5,2,1,11,12,13,3,4,6,7,8,9];
GroupIdOps.PGroups[32] := [51,45,36,21,16,3,1,46,47,48,22,23,37,25,26,24,38,
    2,4,5,12,17,39,40,41,42,9,10,14,13,11,15,27,34, 35,28,29,30,31,32,33,49,
    50,43,44,6,7,8,18,19,20];
GroupIdOps.PGroups[64] := [267,260,246,192,183,83,50,55,26,2,1,261,262,263,
    193,194,247,196,197,195,248,56,84,87,103,184,198,58,59,57,85,86,112,115,
    126,185,17,3,27,29,44,51,250,251,252,253,95,96,107,106,101,110,97,108,
    118,119,120,124,21,20,22,6,7,16,15,31,45,202,211,212,203,204,205,207,
    208,209,206,213,214,210,60,65,61,67,71,66,72,70,62,63,69,68,64,88,104,
    89,105,113,116,117,127,114,264,265,266,199,201,200,249,254,255,256,99,
    98,100,109,123,121,122,102,111,125,90,92,93,91,94,23,24,25,4,5,30,186,
    187,188,189,38,39,47,48,40,49,73,76,75,74,80,79,77,78,81,82,226,230,239,
    227,231,229,228,235,238,232,234,240,236,233,237,215,216,218,217,224,
    225,219,221,220,223,222,18,19,28,242,241,243,244,245,174,173,181,179,
    175,167,168,147,146,148,176,180,169,128,131,129,132,140,141,155,142,
    157,156,143,158,161,162,164,165,130,133,144,145,159,160,163,166,177,
    178,182,150,149,151,171,170,172,12,13,14,8,9,10,11,257,258,259,190,191,
    46,42,41,43,32,33,34,35,36,37,153,152,154,138,139,134,136,135,137,52,
    53,54];
GroupIdOps.PGroups[ 3] := [1];
GroupIdOps.PGroups[ 9] := [2,1];
GroupIdOps.PGroups[27] := [5,2,1,3,4];
GroupIdOps.PGroups[81] := [15,11,5,2,1,12,13,3,4,14,6,7,9,8,10];


#############################################################################
##
#V  GroupIdOps.3primes  . . . . . . . . . . . . pqr group id for small groups
##
GroupIdOps.3primes     := [];
GroupIdOps.3primes[18] := [,,["M",2,3],["D",2,3,3],["K",2,3]];
GroupIdOps.3primes[30] := [,["D",2,5,3],["D",2,3,5],["G",2,3,5,1]];
GroupIdOps.3primes[42] := [,["D",2,7,3],["D",3,7,2],["D",2,3,7],["H",2,3,7],
                            ["G",2,3,7,1]];
GroupIdOps.3primes[50] := [,,["M",2,5],["D",2,5,5],["K",2,5]];
GroupIdOps.3primes[66] := [,["D",2,11,3],["D",2,3,11],["G",2,3,11,1]];
GroupIdOps.3primes[70] := [,["D",2,7,5],["D",2,5,7],["G",2,5,7,1]];
GroupIdOps.3primes[75] := [,,["N",3,5]];
GroupIdOps.3primes[78] := [,["D",2,13,3],["D",3,13,2],["D",2,3,13],
                            ["H",2,3,13],["G",2,3,13,1]];
GroupIdOps.3primes[98] := [,,["M",2,7],["D",2,7,7],["K",2,7]];


#############################################################################
##
#F  GroupIdOps.AbelianPGroups . . . . . . .  abelian p-group catalogue number
##
GroupIdOps.AbelianPGroups := [];

GroupIdOps.AbelianPGroups[128] := [
    [[128],1],[[8,16],42],[[4,32],128],[[2,64],159],[[2,8,8],179],
    [[4,4,8],456],[[2,4,16],837],[[2,2,32],988],[[2,4,4,4],997],
    [[2,2,4,8],1601],[[2,2,2,16],2136],[[2,2,2,4,4],2150],
    [[2,2,2,2,8],2301],[[2,2,2,2,2,4],2319],[[2,2,2,2,2,2,2],2328] ];

GroupIdOps.AbelianPGroups[256] := [
    [[256],1],[[16,16],39],[[8,32],316],[[4,64],497],[[2,128],537],
    [[4,8,8],826],[[2,8,16],4384],[[4,4,16],5525],[[2,4,32],6534],
    [[2,2,64],6723],[[4,4,4,4],6732],[[2,2,8,8],10298],[[2,4,4,8],13313],
    [[2,2,4,16],26308],[[2,2,2,32],26959],[[2,2,4,4,4],26973],
    [[2,2,2,4,8],53038],[[2,2,2,2,16],55608],[[2,2,2,2,4,4],55626],
    [[2,2,2,2,2,8],56059],[[2,2,2,2,2,2,4],56082],[[2,2,2,2,2,2,2,2],56092] ];

GroupIdOps.AbelianPGroups[243] := [
    [[243],1],[[9,27],10],[[3,81],23],[[3,9,9],31],[[3,3,27],48],
    [[3,3,3,9],61],[[3,3,3,3,3],67] ];

GroupIdOps.AbelianPGroups[729] := [
    [[729],1],[[27,27],2],[[9,81],58],[[3,243],93],[[9,9,9],102],
    [[3,9,27],238],[[3,3,81],391],[[3,3,9,9],415],[[3,3,3,27],475],
    [[3,3,3,3,9],497],[[3,3,3,3,3,3],504] ];


#############################################################################
##
#F  GroupIdOps.Nr4Squares( <G> )  .  different squares of elements of order 4
##
GroupIdOps.Nr4Squares := function( G )
    local   tmp;

    # returns a list of all squares of elements of order 4.
    tmp := List( Collected( List( Filtered( Elements(G),
                 x -> Order(G,x)=4 ), x -> x^2 ) ), z -> z[2] );
    Sort(tmp);
    return tmp;

end;


#############################################################################
##
#F  GroupIdOps.Nr8Squares( <G> )  .  different squares of elements of order 8
##
GroupIdOps.Nr8Squares := function( G )
    local   tmp;

    # returns a list of all squares of elements of order 16.
    tmp := List( Collected( List( Filtered( Elements(G),
                 x -> Order(G,x)=8 ), x -> x^2 ) ), z -> z[2] ); 
    Sort(tmp);
    return tmp;

end;


#############################################################################
##
#F  GroupIdOps.NrClasses( <G>, <l>, <n> ) . . . . number of conjugacy classes
##
GroupIdOps.NrClasses := function( G, l, n )
    local   c;

    # number of conjugacy classes of length <l> with element order <n>
    c := ConjugacyClasses(G);
    c := Filtered( c, x -> Size(x) = l );
    return Number( c, x -> Order(G,Representative(x)) = n );

end;


#############################################################################
##
#F  GroupIdOps.Stable( <G>, <o>, <p> )  .  number of stable conjugacy classes
##
GroupIdOps.Stable := function( G, o, p )
    local   c1;

    # get conjugacy classes of elements of order <o>
    c1 := Filtered( Elements(G), x -> Order(G,x) = o );
    c1 := Orbits( G, c1 );

    # check how many are mapped to themself under x -> x ^ <p>
    return Number( c1, x -> x[1]^p in x );

end;


#############################################################################
##
#F  GroupIdOps.Stable2( <G> ) . . . . . .  number of stable conjugacy classes
##
GroupIdOps.Stable2 := function( G )
    local   c1, c2;

    c1 := Filtered( Elements(G), x -> Order(G,x) = 2 );
    c1 := Orbits( G, c1 );

    c2 := Filtered( Elements(G), x -> Order(G,x) = 4 );
    c2 := List( Orbits( G, c2 ), x -> x[1]^2 );

    c2 := List( c2, x -> First( c1, t -> x in t ) );
    c2 := List( Collected(List(c2,x->Position(c1,x))), x -> x[2] );
    Sort(c2);
    return c2;

end;


#############################################################################
##
#F  GroupIdOps.Group16( <G> ) . . . . . . . . . . . . . . groups of order  16
##
GroupIdOps.Group16 := function( G )
    local   x,  nr,  inv,  name;

    # count the orders
    x := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );

    # abelian groups
    if IsAbelian(G)  then

        # 2 x 2 x 2 x 2
        if x[4] = 15  then
            nr   := 1;
            inv  := [ 2, 2, 2, 2 ];
            name := [ "2^4" ];

        # 2 x 2 x 4
        elif x[4] = 7  then
            nr   := 2;
            inv  := [ 2, 2, 4 ];
            name := [ "2^2x4" ];

        # 16
        elif x[4] = 1  then
            nr   := 5;
            inv  := [ 16 ];
            name := [ "16" ];

        # 4 x 4 (warning: 16.3 and 16.4 as enumerated in GAP)
        elif x[4] = 3 and x[6] = 12  then
            nr   := 4;
            inv  := [ 4, 4 ];
            name := [ "4x4" ];

        # 2 x 8 (in the catalogue 16.3 and 16.4 are swapped)
        else # x[4] = 3 and x[6] = 4  the
            nr   := 3;
            inv  := [ 2, 8 ];
            name := [ "2x8" ];
        fi;

        # and return
        return rec( catalogue := [ 16, nr ],
                    size      := 16,
                    names     := name );

    # non-abelian groups
    else
        name := [];

        # D8x2
        if x[4] = 11  then
            nr   := 6;
            name := [ "D8x2" ];

        # no special name
        elif x[4] = 3 and x[6] = 4  then
            nr   := 11;

        # D16
        elif x[4] = 9 then
            nr   := 12;
            name := [ "D16" ];

        # quasi-dihedreal
        elif x[4] = 5  then
            nr   := 13;
            name := [ "QD16" ];

        # Q8x2 or (2x4).2
        elif x[4] = 3 and x[6] =12  then
            if GroupIdOps.Nr4Squares(G) = [12]  then
                nr   := 7;
                name := [ "Q8x2" ];
            else
                nr   := 10;
                name := [ "(2x4).2" ];
            fi;

        # D8Y4 or something else
        elif x[4] = 7  then
            if GroupIdOps.Nr4Squares(G) = [8]  then
                nr   := 8;
                name := [ "D8Y4" ];
            else
                nr   := 9;
            fi;

        # Q16
        else
            nr   := 14;
            name := [ "Q16" ];
        fi;

        # and return
        return rec( catalogue := [ 16, nr ],
                    size      := 16,
                    names     := name );
    fi;

end;


#############################################################################
##
#F  GroupIdOps.Group18( <G> ) . . . . . . . . . . . . . . groups of order  18
##
GroupIdOps.Group18 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList18, x );

    # and return
    return rec( catalogue := [ 18, nr ],
                names     := GroupIdOps.GroupName18[nr],
                size      := 18 );
end;

GroupIdOps.GroupName18 := [
    ["6x3"], ["18"], ["D18"], ["S3x3"], ["3^2:2"] ];

GroupIdOps.GroupList18 := [
    [ 1, 1, 2, 1, 3, 8, 6, 8 ],
    [ 1, 1, 2, 1, 3, 2, 6, 2, 9, 6, 18, 6 ], 
    [ 1, 1, 2, 9, 3, 2, 9, 6 ], [ 1, 1, 2, 3, 3, 8, 6, 6 ], 
    [ 1, 1, 2, 9, 3, 8 ] ];

#############################################################################
##
#F  GroupIdOps.Group24( <G> ) . . . . . . . . . . . . . . groups of order  24
##
GroupIdOps.Group24 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList24, x );

    # and return
    return rec( catalogue := [ 24, nr ],
                names     := GroupIdOps.GroupName24[nr],
                size      := 24 );
end;

GroupIdOps.GroupName24 := [
    ["2^3x3"], ["12x2"], ["24"], ["D8x3"], ["Q8x3"], ["S3x2^2"], ["S3x4"],
    ["2x6.2"], ["12.2"], ["A4x2"], [], ["D24"], ["Q8+S3"], ["SL(2,3)"],
    ["S4"] ];

GroupIdOps.GroupList24 := [
    [ 1, 1, 2, 7, 3, 2, 6, 14 ],
    [ 1, 1, 2, 3, 3, 2, 4, 4, 6, 6, 12, 8 ],
    [ 1, 1, 2, 1, 3, 2, 4, 2, 6, 2, 8, 4, 12, 4, 24, 8 ],
    [ 1, 1, 2, 5, 3, 2, 4, 2, 6, 10, 12, 4 ],
    [ 1, 1, 2, 1, 3, 2, 4, 6, 6, 2, 12, 12 ],
    [ 1, 1, 2, 15, 3, 2, 6, 6 ],
    [ 1, 1, 2, 7, 3, 2, 4, 8, 6, 2, 12, 4 ],
    [ 1, 1, 2, 3, 3, 2, 4, 12, 6, 6 ],
    [ 1, 1, 2, 1, 3, 2, 4, 2, 6, 2, 8, 12, 12, 4 ],
    [ 1, 1, 2, 7, 3, 8, 6, 8 ],
    [ 1, 1, 2, 9, 3, 2, 4, 6, 6, 6 ],
    [ 1, 1, 2, 13, 3, 2, 4, 2, 6, 2, 12, 4 ],
    [ 1, 1, 2, 1, 3, 2, 4, 14, 6, 2, 12, 4 ],
    [ 1, 1, 2, 1, 3, 8, 4, 6, 6, 8 ],
    [ 1, 1, 2, 9, 3, 8, 4, 6 ] ];


#############################################################################
##
#F  GroupIdOps.Group30( <G> ) . . . . . . . . . . . . . . groups of order  30
##
GroupIdOps.Group30 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList30, x );

    # and return
    return rec( catalogue := [ 30, nr ],
                names     := GroupIdOps.GroupName30[nr],
                size      := 30 );
end;

GroupIdOps.GroupName30 := [
    [ "30" ], [ "D10x3" ], [ "S3x5" ], [ "D30" ] ];

GroupIdOps.GroupList30 := [
    [ 1, 1, 2, 1, 3, 2, 5, 4, 6, 2, 10, 4, 15, 8, 30, 8 ], 
    [ 1, 1, 2, 5, 3, 2, 5, 4, 6, 10, 15, 8 ], 
    [ 1, 1, 2, 3, 3, 2, 5, 4, 10, 12, 15, 8 ], 
    [ 1, 1, 2, 15, 3, 2, 5, 4, 15, 8 ] ];

#############################################################################
##
#F  GroupIdOps.Group32( <G> ) . . . . . . . . . . . . . . groups of order  32
##
GroupIdOps.Group32 := function( G )
    local   c,  o,  id4,  nr;

    # compute the conjugacy classes
    # List(ConjugacyClasses(G),x->[Size(x),Order(G,Representative(x))]);
    c := Orbits( G, Elements(G) );
    c := List( c, x -> [ Length(x), Order(G,x[1]) ] );
    Sort(c);

    # and compute the element orders
    o := Collected( List( Elements(G), x -> Order(G,x) ) );

    # and number of different squares of elements of order 4
    id4 := GroupIdOps.Nr4Squares(G);

    # find these triples in our list
    nr := Position( GroupIdOps.GroupList32, Flat([o,id4,c]) );

    # there are two problem pairs 13/20 and 19/21
    if nr = 13  then
        if GroupIdOps.Nr8Squares(G) = [4,4,4,4]  then
            nr := 20;
        fi;
    elif nr = 19  then
        if GroupIdOps.Nr8Squares(G) = [8,8]  then
            nr := 21;
        fi;
    fi;

    # and return
    return rec( catalogue := [ 32, nr ],
                names     := GroupIdOps.GroupName32[nr],
                size      := 32 );
end;

GroupIdOps.GroupName32 := [
    ["2^5"], ["2^3x4"], ["2^2x8"], ["4^2x2"], ["16x2"], ["8x4"], ["32"],
    ["D8x2^2"], ["Q8x2^2"], ["D8Y4x2"], [], ["2x(2x4).2"], [], ["D8x4"],
    ["Q8x4"], [], ["D8Y8"], [], [], [], ["8+Q8"], [], ["D16x2"], ["QD16x2"],
    ["Q16x2"], ["D16Y4"], [], [], [], [], [], [], [], [], ["Q8+Q8"], [],
    [], [], [], [], [], ["D8YD8"], ["D8YQ8"], [], [], [], [], [], ["D32"],
    ["QD32"], ["Q32"]];

GroupIdOps.GroupList32 := [
    [1,1,2,31,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,
     2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2],
    [1,1,2,15,4,16,16,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,
     2,1,2,1,2,1,2,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
     1,4,1,4,1,4],
    [1,1,2,7,4,8,8,16,8,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,4,1,4,1,4,1,4,
     1,4,1,4,1,4,1,4,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,
     8,1,8,1,8,1,8],
    [1,1,2,7,4,24,8,8,8,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,4,1,4,1,4,1,4,
     1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,
     4,1,4,1,4,1,4],
    [1,1,2,3,4,4,8,8,16,16,4,1,1,1,2,1,2,1,2,1,4,1,4,1,4,1,4,1,8,1,8,1,
     8,1,8,1,8,1,8,1,8,1,8,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,
     1,16,1,16,1,16,1,16,1,16,1,16,1,16],
    [1,1,2,3,4,12,8,16,4,4,4,1,1,1,2,1,2,1,2,1,4,1,4,1,4,1,4,1,4,1,4,1,
     4,1,4,1,4,1,4,1,4,1,4,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,
     1,8,1,8,1,8,1,8,1,8],
    [1,1,2,1,4,2,8,4,16,8,32,16,2,1,1,1,2,1,4,1,4,1,8,1,8,1,8,1,8,1,16,
     1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,32,1,32,1,32,1,32,1,32,1,32,1,
     32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32],
    [1,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8,8,8,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,2,4,2,4,2,4,2,4,
     2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4],
    [1,1,2,3,4,12,8,16,4,4,4,1,1,1,2,1,2,1,2,1,4,1,4,1,4,1,4,2,4,2,4,2,
     4,2,4,2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8],
    [1,1,2,7,4,8,8,16,8,1,1,1,2,1,2,1,2,1,4,1,4,1,4,1,4,2,2,2,2,2,4,2,4,
     2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8],
    [1,1,2,3,4,12,8,16,4,4,4,1,1,1,2,1,2,1,2,1,4,1,4,1,4,1,4,2,4,2,4,2,
     4,2,4,2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8],
    [1,1,2,3,4,4,8,8,16,16,4,1,1,1,2,1,4,1,4,1,8,1,8,1,8,1,8,2,2,2,4,2,
     8,2,8,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16],
    [1,1,2,19,4,4,8,8,4,1,1,1,2,1,2,1,2,2,4,2,4,2,8,2,8,2,8,2,8,4,2,4,2,
     4,2,4,2],
    [1,1,2,11,4,12,8,8,12,1,1,1,2,1,2,1,2,2,4,2,4,2,8,2,8,2,8,2,8,4,2,4,
     2,4,4,4,4],
    [1,1,2,3,4,20,8,8,20,1,1,1,2,1,2,1,2,2,4,2,4,2,8,2,8,2,8,2,8,4,4,4,
     4,4,4,4,4],
    [1,1,2,11,4,12,8,8,12,1,1,1,2,1,4,1,4,2,2,2,4,2,8,2,8,2,8,2,8,4,2,4,
     2,4,4,4,4],
    [1,1,2,11,4,12,8,8,4,8,1,1,1,2,1,2,1,2,2,4,2,4,2,8,2,8,2,8,2,8,4,2,
     4,2,4,4,4,4],
    [1,1,2,3,4,20,8,8,8,12,1,1,1,2,1,2,1,2,2,4,2,4,2,8,2,8,2,8,2,8,4,4,
     4,4,4,4,4,4],
    [1,1,2,3,4,20,8,8,4,16,1,1,1,2,1,2,1,2,2,4,2,4,2,8,2,8,2,8,2,8,4,4,
     4,4,4,4,4,4],
    [1,1,2,3,4,20,8,8,4,8,8,1,1,1,2,1,2,1,2,2,4,2,4,2,8,2,8,2,8,2,8,4,4,
     4,4,4,4,4,4],
    [1,1,2,7,4,16,8,8,4,4,8,1,1,1,2,1,4,1,4,2,2,2,4,2,4,2,4,2,4,2,4,4,2,
     4,4,4,8,4,8],
    [1,1,2,3,4,4,8,24,4,1,1,1,2,1,4,1,4,2,2,2,4,2,8,2,8,2,8,2,8,4,8,4,8,
     4,8,4,8],
    [1,1,2,19,4,12,4,4,4,1,1,1,2,1,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,4,2,4,
     4,4,4,4,4],
    [1,1,2,19,4,12,4,4,4,1,1,1,2,1,2,1,2,2,4,2,4,2,4,2,4,2,4,2,4,4,2,4,
     2,4,2,4,2],
    [1,1,2,3,4,28,4,4,20,1,1,1,2,1,2,1,2,2,4,2,4,2,4,2,4,2,4,2,4,4,4,4,
     4,4,4,4,4],
    [1,1,2,15,4,16,8,8,1,1,1,2,1,2,1,2,2,2,2,2,2,4,2,4,2,4,2,4,4,2,4,2,
     4,4,4,4],
    [1,1,2,7,4,24,8,16,1,1,1,2,1,2,1,2,2,2,2,2,2,4,2,4,2,4,2,4,4,4,4,4,
     4,4,4,4],
    [1,1,2,11,4,20,4,4,12,1,1,1,2,1,2,1,2,2,2,2,2,2,4,2,4,2,4,2,4,4,2,4,
     4,4,4,4,4],
    [1,1,2,11,4,20,4,4,12,1,1,1,2,1,2,1,2,2,4,2,4,2,4,2,4,2,4,2,4,4,2,4,
     2,4,4,4,4],
    [1,1,2,3,4,28,4,12,12,1,1,1,2,1,2,1,2,2,4,2,4,2,4,2,4,2,4,2,4,4,4,4,
     4,4,4,4,4],
    [1,1,2,7,4,24,8,8,8,1,1,1,2,1,2,1,2,2,4,2,4,2,4,2,4,2,4,2,4,4,2,4,4,
     4,4,4,4],
    [1,1,2,19,4,12,12,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,4,2,
     4,2,4,2,4,2,4,2,4],
    [1,1,2,11,4,20,20,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,4,2,4,2,4,2,4,2,4,2,
     4,2,4,2,4,2,4,2,4],
    [1,1,2,15,4,8,8,8,8,1,1,1,2,2,2,2,4,2,4,4,2,4,2,4,2,4,4,4,8,4,8],
    [1,1,2,7,4,16,8,8,16,1,1,1,2,2,2,2,4,2,4,4,2,4,4,4,4,4,4,4,8,4,8],
    [1,1,2,11,4,20,4,4,4,4,4,1,1,1,2,2,2,2,2,2,2,4,2,4,4,4,4,4,4,4,4,4,4],
    [1,1,2,11,4,4,8,16,4,1,1,1,2,2,2,2,4,2,4,4,2,4,2,4,8,4,8,4,8,4,8],
    [1,1,2,3,4,12,8,16,12,1,1,1,2,2,2,2,4,2,4,4,4,4,4,4,8,4,8,4,8,4,8],
    [1,1,2,17,4,2,8,4,16,8,2,1,1,1,2,2,4,2,8,2,8,2,16,2,16,2,16,2,16,8,
     2,8,2],
    [1,1,2,9,4,10,8,4,16,8,10,1,1,1,2,2,4,2,8,2,8,2,16,2,16,2,16,2,16,8,
     2,8,4],
    [1,1,2,1,4,18,8,4,16,8,18,1,1,1,2,2,4,2,8,2,8,2,16,2,16,2,16,2,16,8,
     4,8,4]];


#############################################################################
##
#F  GroupIdOps.Group36( <G> ) . . . . . . . . . . . . . . groups of order  36
##
GroupIdOps.Group36 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList36, x );

    # and return
    return rec( catalogue := [ 36, nr ],
                names     := GroupIdOps.GroupName36[nr],
                size      := 36 );
end;

GroupIdOps.GroupName36 := [
    ["6x6"], ["18x2"], ["12x3"], ["36"], ["6xS3"], ["3x6.2"], ["A4x3"],
    ["(2^2x3).3"], ["2x3^2:2"], ["(3^2x2).2"], ["D36"], ["18.2"],
    ["S3^2"], ["3^2:4"] ];

GroupIdOps.GroupList36 := [
    [ 1, 1, 2, 3, 3, 8, 6, 24 ],
    [ 1, 1, 2, 3, 3, 2, 6, 6, 9, 6, 18, 18 ],   # 36.3 in catalogue
    [ 1, 1, 2, 1, 3, 8, 4, 2, 6, 8, 12, 16 ],   # 36.2 in catalogue
    [ 1, 1, 2, 1, 3, 2, 4, 2, 6, 2, 9, 6, 12, 4, 18, 6, 36, 12 ],
    [ 1, 1, 2, 7, 3, 8, 6, 20 ],
    [ 1, 1, 2, 1, 3, 8, 4, 6, 6, 8, 12, 12 ],
    [ 1, 1, 2, 3, 3, 26, 6, 6 ],
    [ 1, 1, 2, 3, 3, 2, 6, 6, 9, 24 ],
    [ 1, 1, 2, 19, 3, 8, 6, 8 ],
    [ 1, 1, 2, 1, 3, 8, 4, 18, 6, 8 ],
    [ 1, 1, 2, 19, 3, 2, 6, 2, 9, 6, 18, 6 ],
    [ 1, 1, 2, 1, 3, 2, 4, 18, 6, 2, 9, 6, 18, 6 ],
    [ 1, 1, 2, 15, 3, 8, 6, 12 ],
    [ 1, 1, 2, 9, 3, 8, 4, 18 ] ];


#############################################################################
##
#F  GroupIdOps.Group40( <G> ) . . . . . . . . . . . . . . groups of order  40
##
GroupIdOps.Group40 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList40, x );

    # and return
    return rec( catalogue := [ 40, nr ],
                names     := GroupIdOps.GroupName40[nr],
                size      := 40 );
end;

GroupIdOps.GroupName40 := [
    ["2^3x5"], ["2x20"], ["40"], ["D8x5"], ["Q8x5"], ["2xD20"], ["4xD10"],
    ["2x10.2"], ["20.2"], ["2x5:4"], ["10.4"], [], ["D40"], ["Q8+D10"] ];


GroupIdOps.GroupList40 := [
    [ 1, 1, 2, 7, 5, 4, 10, 28 ],
    [ 1, 1, 2, 3, 4, 4, 5, 4, 10, 12, 20, 16 ],
    [ 1, 1, 2, 1, 4, 2, 5, 4, 8, 4, 10, 4, 20, 8, 40, 16 ],
    [ 1, 1, 2, 5, 4, 2, 5, 4, 10, 20, 20, 8 ],
    [ 1, 1, 2, 1, 4, 6, 5, 4, 10, 4, 20, 24 ],
    [ 1, 1, 2, 23, 5, 4, 10, 12 ],
    [ 1, 1, 2, 11, 4, 12, 5, 4, 10, 4, 20, 8 ],
    [ 1, 1, 2, 3, 4, 20, 5, 4, 10, 12 ],
    [ 1, 1, 2, 1, 4, 2, 5, 4, 8, 20, 10, 4, 20, 8 ],
    [ 1, 1, 2, 11, 4, 20, 5, 4, 10, 4 ],
    [ 1, 1, 2, 1, 4, 10, 5, 4, 8, 20, 10, 4 ],
    [ 1, 1, 2, 13, 4, 10, 5, 4, 10, 12 ],
    [ 1, 1, 2, 21, 4, 2, 5, 4, 10, 4, 20, 8 ],
    [ 1, 1, 2, 1, 4, 22, 5, 4, 10, 4, 20, 8 ] ];


#############################################################################
##
#F  GroupIdOps.Group42( <G> ) . . . . . . . . . . . . . . groups of order  42
##
GroupIdOps.Group42 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList42, x );

    # and return
    return rec( catalogue := [ 42, nr ],
                names     := GroupIdOps.GroupName42[nr],
                size      := 42 );
end;

GroupIdOps.GroupName42 := [
    [ "42" ], [ "D14x3" ], [ "7:3x2" ], [ "S3x7" ], [ "7:6" ], [ "D42" ] ];

GroupIdOps.GroupList42 := [
    [ 1, 1, 2, 1, 3, 2, 6, 2, 7, 6, 14, 6, 21, 12, 42, 12 ], 
    [ 1, 1, 2, 7, 3, 2, 6, 14, 7, 6, 21, 12 ], 
    [ 1, 1, 2, 1, 3, 14, 6, 14, 7, 6, 14, 6 ], 
    [ 1, 1, 2, 3, 3, 2, 7, 6, 14, 18, 21, 12 ], 
    [ 1, 1, 2, 7, 3, 14, 6, 14, 7, 6 ],
    [ 1, 1, 2, 21, 3, 2, 7, 6, 21, 12 ] ];

#############################################################################
##
#F  GroupIdOps.Group48( <G> ) . . . . . . . . . . . . . . groups of order  48
##
GroupIdOps.Group48 := function( G )
    local   z1,  z2,  z3,  nr,  tmp;

    # look up element orders in group list
    z1 := Collected( List( Elements(G), x -> Order(G,x) ) );

    # abelian or nor abelian
    if IsAbelian(G)  then z2 := 1;  else z2 := 0;  fi;

    # length of conjugacy classes
    # List(ConjugacyClasses(G),x->[Size(x),Order(G,Representative(x))])
    z3 := List( Orbits( G, Elements(G) ), x -> [Length(x),Order(G,x[1])] );
    z3 := Collected(z3);
    Sort(z3);

    # get possible catalogue number
    nr := Position( GroupIdOps.GroupList48, Flat([z1,z2,z3]) );

    # for 7/10 check 4 squares, 48.7 = [12], 48.10 = [4,8]
    if nr = 7  then
        if GroupIdOps.Nr4Squares(G) = [4,8]  then
            nr := 10;
        fi;
    fi;

    # for 26/29/30 check 4 squares, 48.26=[28], 48.29=[12,16], 48.30=[4,24]
    if nr = 26  then
        tmp := GroupIdOps.Nr4Squares(G);
        if tmp = [12,16]  then
            nr := 29;
        elif tmp = [4,24]  then
            nr := 30;
        fi;
    fi;

    # and return
    return rec( catalogue := [ 48, nr ],
                names     := GroupIdOps.GroupName48[nr],
                size      := 48 );
end;

GroupIdOps.GroupName48 := [
    ["2^4x3"], ["2^2x12"], ["24x2"], ["4^2x3"], ["48"], ["6xD8"], ["6xQ8"],
    ["3xD8Y4"], [  ], ["3x(2x4).2"], [], ["3xD16"], ["3xQD16"], ["3xQ16"],
    ["2^3xS3"], ["2x4xS3"], ["2^2x6.2"], ["4x6.2"], ["8xS3"], ["2x12.2"],
    ["24.2"], ["2^2xA4"], ["4xA4"], [], ["2xD24"], ["2xQ8+S3"], [], [], 
    [], [], [], [], [], ["SL(2,3)x2"], [], ["2xS4"], ["4+S4"], ["D8xS3"],
    ["Q8xS3"], ["(6.2)YD8"], ["(6.2)YQ8"], ["D48"], [], [], [], [], [], [], 
    ["GL(2,3)"], [], ["A4+A4"], [] ];

GroupIdOps.GroupList48 := [
    [1,1,2,15,3,2,6,30,1,1,1,1,1,2,15,1,3,2,1,6,30],
    [1,1,2,7,3,2,4,8,6,14,12,16,1,1,1,1,1,2,7,1,3,2,1,4,8,1,6,14,1,12,16],
    [1,1,2,3,3,2,4,4,6,6,8,8,12,8,24,16,1,1,1,1,1,2,3,1,3,2,1,4,4,1,6,6,1,
     8,8,1,12,8,1,24,16],
    [1,1,2,3,3,2,4,12,6,6,12,24,1,1,1,1,1,2,3,1,3,2,1,4,12,1,6,6,1,12,24],
    [1,1,2,1,3,2,4,2,6,2,8,4,12,4,16,8,24,8,48,16,1,1,1,1,1,2,1,1,3,2,1,4,
     2,1,6,2,1,8,4,1,12,4,1,16,8,1,24,8,1,48,16],
    [1,1,2,11,3,2,4,4,6,22,12,8,0,1,1,1,1,2,3,1,3,2,1,6,6,2,2,4,2,4,2,2,6,
     8,2,12,4],
    [1,1,2,3,3,2,4,12,6,6,12,24,0,1,1,1,1,2,3,1,3,2,1,6,6,2,4,6,2,12,12],
    [1,1,2,7,3,2,4,8,6,14,12,16,0,1,1,1,1,2,1,1,3,2,1,4,2,1,6,2,1,12,4,2,
     2,3,2,4,3,2,6,6,2,12,6],
    [1,1,2,7,3,2,4,8,6,14,12,16,0,1,1,1,1,2,3,1,3,2,1,6,6,2,2,2,2,4,4,2,6,
     4,2,12,8],
    [1,1,2,3,3,2,4,12,6,6,12,24,0,1,1,1,1,2,3,1,3,2,1,6,6,2,4,6,2,12,12],
    [1,1,2,3,3,2,4,4,6,6,8,8,12,8,24,16,0,1,1,1,1,2,1,1,3,2,1,4,2,1,6,2,
     1,12,4,2,2,1,2,4,1,2,6,2,2,8,4,2,12,2,2,24,8],
    [1,1,2,9,3,2,4,2,6,18,8,4,12,4,24,8,0,1,1,1,1,2,1,1,3,2,1,6,2,2,4,1,
     2,8,2,2,12,2,2,24,4,4,2,2,4,6,4],
    [1,1,2,5,3,2,4,6,6,10,8,4,12,12,24,8,0,1,1,1,1,2,1,1,3,2,1,6,2,2,4,1,
     2,8,2,2,12,2,2,24,4,4,2,1,4,4,1,4,6,2,4,12,2],
    [1,1,2,1,3,2,4,10,6,2,8,4,12,20,24,8,0,1,1,1,1,2,1,1,3,2,1,6,2,2,4,1,
     2,8,2,2,12,2,2,24,4,4,4,2,4,12,4],
    [1,1,2,31,3,2,6,14,0,1,1,1,1,2,7,2,3,1,2,6,7,3,2,8],
    [1,1,2,15,3,2,4,16,6,6,12,8,0,1,1,1,1,2,3,1,4,4,2,3,1,2,6,3,2,12,4,3,
     2,4,3,4,4],
    [1,1,2,7,3,2,4,24,6,14,0,1,1,1,1,2,7,2,3,1,2,6,7,3,4,8],
    [1,1,2,3,3,2,4,28,6,6,12,8,0,1,1,1,1,2,3,1,4,4,2,3,1,2,6,3,2,12,4,3,4,8],
    [1,1,2,7,3,2,4,8,6,2,8,16,12,4,24,8,0,1,1,1,1,2,1,1,4,2,1,8,4,2,3,1,2,6,
     1,2,12,2,2,24,4,3,2,2,3,4,2,3,8,4],
    [1,1,2,3,3,2,4,4,6,6,8,24,12,8,0,1,1,1,1,2,3,1,4,4,2,3,1,2,6,3,2,12,4,3,
     8,8],
    [1,1,2,1,3,2,4,2,6,2,8,4,12,4,16,24,24,8,0,1,1,1,1,2,1,1,4,2,1,8,4,2,3,
     1,2,6,1,2,12,2,2,24,4,3,16,8],
    [1,1,2,15,3,8,6,24,0,1,1,1,1,2,3,3,2,4,4,3,2,4,6,6],
    [1,1,2,7,3,8,4,8,6,8,12,16,0,1,1,1,1,2,1,1,4,2,3,2,2,3,4,2,4,3,2,4,6,2,
     4,12,4],
    [1,1,2,19,3,2,4,12,6,14,0,1,1,1,1,2,3,2,2,2,2,3,1,2,6,7,6,2,2,6,4,2],
    [1,1,2,27,3,2,4,4,6,6,12,8,0,1,1,1,1,2,3,2,3,1,2,4,2,2,6,3,2,12,4,6,2,4],
    [1,1,2,3,3,2,4,28,6,6,12,8,0,1,1,1,1,2,3,2,3,1,2,4,2,2,6,3,2,12,4,6,4,4],
    [1,1,2,7,3,2,4,24,6,14,0,1,1,1,1,2,3,2,2,2,2,3,1,2,6,7,6,4,4],
    [1,1,2,15,3,2,4,16,6,6,12,8,0,1,1,1,1,2,3,2,3,1,2,4,2,2,6,3,2,12,4,6,2,
     2,6,4,2],
    [1,1,2,3,3,2,4,28,6,6,12,8,0,1,1,1,1,2,3,2,3,1,2,4,2,2,6,3,2,12,4,6,4,4],
    [1,1,2,3,3,2,4,28,6,6,12,8,0,1,1,1,1,2,3,2,3,1,2,4,2,2,6,3,2,12,4,6,4,4],
    [1,1,2,15,3,2,4,16,6,6,12,8,0,1,1,1,1,2,1,1,4,2,2,2,1,2,3,1,2,4,1,2,6,3,
     2,12,4,6,2,2,6,4,2],
    [1,1,2,3,3,2,4,4,6,6,8,24,12,8,0,1,1,1,1,2,1,1,4,2,2,2,1,2,3,1,2,4,1,2,6,
     3,2,12,4,6,8,4],
    [1,1,2,7,3,2,4,8,6,2,8,16,12,4,24,8,0,1,1,1,1,2,1,1,4,2,2,3,1,2,6,1,2,8,
     2,2,12,2,2,24,4,6,2,1,6,4,1,6,8,2],
    [1,1,2,3,3,8,4,12,6,24,0,1,1,1,1,2,3,4,3,2,4,6,6,6,4,2],
    [1,1,2,7,3,8,4,8,6,8,12,16,0,1,1,1,1,2,1,1,4,2,4,3,2,4,6,2,4,12,4,6,2,1,
     6,4,1],
    [1,1,2,19,3,8,4,12,6,8,0,1,1,1,1,2,1,3,2,2,6,2,2,6,4,2,8,3,1,8,6,1],
    [1,1,2,7,3,8,4,24,6,8,0,1,1,1,1,2,1,3,2,2,6,4,4,8,3,1,8,6,1],
    [1,1,2,23,3,2,4,8,6,10,12,4,0,1,1,1,1,2,1,2,2,2,2,3,1,2,4,1,2,6,1,3,2,2,
     4,6,2,4,12,1,6,2,2,6,4,1],
    [1,1,2,7,3,2,4,24,6,2,12,12,0,1,1,1,1,2,1,2,3,1,2,4,3,2,6,1,3,2,2,4,12,
     3,6,4,3],
    [1,1,2,11,3,2,4,20,6,10,12,4,0,1,1,1,1,2,1,2,2,2,2,3,1,2,4,1,2,6,1,3,4,
     2,4,6,2,4,12,1,6,2,1,6,4,2],
    [1,1,2,19,3,2,4,12,6,2,12,12,0,1,1,1,1,2,1,2,3,1,2,4,3,2,6,1,3,4,2,4,12,
     3,6,2,3],
    [1,1,2,25,3,2,4,2,6,2,8,4,12,4,24,8,0,1,1,1,1,2,1,2,3,1,2,4,1,2,6,1,2,8,
     2,2,12,2,2,24,4,12,2,2],
    [1,1,2,13,3,2,4,14,6,2,8,4,12,4,24,8,0,1,1,1,1,2,1,2,3,1,2,4,1,2,6,1,2,
     8,2,2,12,2,2,24,4,12,2,1,12,4,1],
    [1,1,2,1,3,2,4,26,6,2,8,4,12,4,24,8,0,1,1,1,1,2,1,2,3,1,2,4,1,2,6,1,2,8,
     2,2,12,2,2,24,4,12,4,2],
    [1,1,2,17,3,2,4,2,6,10,8,12,12,4,0,1,1,1,1,2,1,2,3,1,2,4,1,2,6,1,4,2,1,
     4,6,2,4,12,1,6,8,2,12,2,1],
    [1,1,2,5,3,2,4,14,6,10,8,12,12,4,0,1,1,1,1,2,1,2,3,1,2,4,1,2,6,1,4,2,1,
     4,6,2,4,12,1,6,8,2,12,4,1],
    [1,1,2,13,3,2,4,6,6,2,8,12,12,12,0,1,1,1,1,2,1,2,3,1,2,4,1,2,6,1,4,4,1,
     4,12,3,6,8,2,12,2,1],
    [1,1,2,1,3,2,4,18,6,2,8,12,12,12,0,1,1,1,1,2,1,2,3,1,2,4,1,2,6,1,4,4,1,
     4,12,3,6,8,2,12,4,1],
    [1,1,2,13,3,8,4,6,6,8,8,12,0,1,1,1,1,2,1,6,4,1,6,8,2,8,3,1,8,6,1,12,2,1],
    [1,1,2,1,3,8,4,18,6,8,8,12,0,1,1,1,1,2,1,6,4,1,6,8,2,8,3,1,8,6,1,12,4,1],
    [1,1,2,15,3,32,0,1,1,1,3,2,5,16,3,2],
    [1,1,2,3,3,32,4,12,0,1,1,1,3,2,1,3,4,4,16,3,2]];


#############################################################################
##
#F  GroupIdOps.Group50( <G> ) . . . . . . . . . . . . . . groups of order  50
##
GroupIdOps.Group50 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList50, x );

    # and return
    return rec( catalogue := [ 50, nr ],
                names     := GroupIdOps.GroupName50[nr],
                size      := 50 );
end;

GroupIdOps.GroupName50 := [
    [ "10x5" ], [ "50" ], [ "D50" ], [ "D10x5" ], [ "5^2:2" ] ];

GroupIdOps.GroupList50 := [
    [ 1, 1, 2, 1, 5, 24, 10, 24 ],
    [ 1, 1, 2, 1, 5, 4, 10, 4, 25, 20, 50, 20 ], 
    [ 1, 1, 2, 25, 5, 4, 25, 20 ],
    [ 1, 1, 2, 5, 5, 24, 10, 20 ], 
    [ 1, 1, 2, 25, 5, 24 ] ];

#############################################################################
##
#F  GroupIdOps.Group54( <G> ) . . . . . . . . . . . . . . groups of order  54
##
GroupIdOps.Group54 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList54, x );

    # element orders for tupless 1/4, 2/5, 9/12, 8/10/11 are equal
    if nr = 1 and not IsAbelian(G)  then
        nr := 4;
    fi;
    if nr = 2 and not IsAbelian(G)  then 
        nr := 5;
    fi;
    if nr = 9 and Length(Orbits(G,Elements(G))) = 10  then
        nr := 12;
    fi;
    if nr = 8 and Length(Orbits(G,Elements(G))) = 10  then
        if Length(DerivedSeries(G)) = 4  then
            nr := 10;
        else
            nr := 11;
        fi;
    fi;

    # and return
    return rec( catalogue := [ 54, nr ],
                names     := GroupIdOps.GroupName54[nr],
                size      := 54 );
end;

GroupIdOps.GroupName54 := [
    ["3^3x2"], ["9x6"], ["54"], ["3^2:3x2"], ["9:3x2"], ["3^2xS3"],
    ["9xS3"], ["3x3^2:2"], ["3xD18"], ["(3^2:3):2"], ["3^2:6"], ["9:6"],
    ["3^3:2"], ["(3x9):2"], ["D54"] ];

GroupIdOps.GroupList54 := [
    [ 1, 1, 2, 1, 3, 26, 6, 26 ], 
    [ 1, 1, 2, 1, 3, 8, 6, 8, 9, 18, 18, 18 ], 
    [ 1, 1, 2, 1, 3, 2, 6, 2, 9, 6, 18, 6, 27, 18, 54, 18 ], 
    [ 1, 1, 2, 1, 3, 26, 6, 26 ], 
    [ 1, 1, 2, 1, 3, 8, 6, 8, 9, 18, 18, 18 ], 
    [ 1, 1, 2, 3, 3, 26, 6, 24 ],
    # swapped: ** and **  (26,24), see catalogue 
    [ 1, 1, 2, 3, 3, 8, 6, 6, 9, 18, 18, 18 ], 
    [ 1, 1, 2, 9, 3, 26, 6, 18 ], 
    [ 1, 1, 2, 9, 3, 8, 6, 18, 9, 18 ], 
    [ 1, 1, 2, 9, 3, 26, 6, 18 ], 
    [ 1, 1, 2, 9, 3, 26, 6, 18 ], 
    [ 1, 1, 2, 9, 3, 8, 6, 18, 9, 18 ], 
    [ 1, 1, 2, 27, 3, 26 ], 
    [ 1, 1, 2, 27, 3, 8, 9, 18 ], 
    [ 1, 1, 2, 27, 3, 2, 9, 6, 27, 18 ] ];


#############################################################################
##
#F  GroupIdOps.Group56( <G> ) . . . . . . . . . . . . . . groups of order  56
##
GroupIdOps.Group56 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList56, x );

    # and return
    return rec( catalogue := [ 56, nr ],
                names     := GroupIdOps.GroupName56[nr],
                size      := 56 );
end;

GroupIdOps.GroupName56 := [
    ["2^3x7"], ["2x28"], ["56"], ["7xD8"], ["7xQ8"], ["2xD28"], ["4xD14"],
     ["2x14.2"], ["28.2"], [], ["D56"], ["Q8+D14"], ["2^3:7"] ];

GroupIdOps.GroupList56 := [
    [ 1, 1, 2, 7, 7, 6, 14, 42 ],
    [ 1, 1, 2, 3, 4, 4, 7, 6, 14, 18, 28, 24 ],
    [ 1, 1, 2, 1, 4, 2, 7, 6, 8, 4, 14, 6, 28, 12, 56, 24 ],
    [ 1, 1, 2, 5, 4, 2, 7, 6, 14, 30, 28, 12 ],
    [ 1, 1, 2, 1, 4, 6, 7, 6, 14, 6, 28, 36 ],
    [ 1, 1, 2, 31, 7, 6, 14, 18 ],
    [ 1, 1, 2, 15, 4, 16, 7, 6, 14, 6, 28, 12 ],
    [ 1, 1, 2, 3, 4, 28, 7, 6, 14, 18 ],
    [ 1, 1, 2, 1, 4, 2, 7, 6, 8, 28, 14, 6, 28, 12 ],
    [ 1, 1, 2, 17, 4, 14, 7, 6, 14, 18 ],
    [ 1, 1, 2, 29, 4, 2, 7, 6, 14, 6, 28, 12 ],
    [ 1, 1, 2, 1, 4, 30, 7, 6, 14, 6, 28, 12 ],
    [ 1, 1, 2, 7, 7, 48 ] ];


#############################################################################
##
#F  GroupIdOps.Group60( <G> ) . . . . . . . . . . . . . . groups of order  60
##
GroupIdOps.Group60 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList60, x );

    # and return
    return rec( catalogue := [ 60, nr ],
                names     := GroupIdOps.GroupName60[nr],
                size      := 60 );
end;

GroupIdOps.GroupName60 := [
    ["2^2x15"], ["60"], ["10xS3"], ["5x3:4"], ["5xA4"], ["6xD10"], 
    ["3x10.2"], ["3x5:4"], ["D60"], ["30.2"], ["S3xD10"], ["S3+(5:4)"],
    ["A5","PSL(2,4)","PSL(2,5)"] ];

GroupIdOps.GroupList60 := [
    [ 1, 1, 2, 3, 3, 2, 5, 4, 6, 6, 10, 12, 15, 8, 30, 24 ],
    [ 1, 1, 2, 1, 3, 2, 4, 2, 5, 4, 6, 2, 10, 4, 12, 4, 15, 8, 20, 8,
      30, 8, 60, 16 ],
    [ 1, 1, 2, 7, 3, 2, 5, 4, 6, 2, 10, 28, 15, 8, 30, 8 ],
    [ 1, 1, 2, 1, 3, 2, 4, 6, 5, 4, 6, 2, 10, 4, 15, 8, 20, 24, 30, 8 ],
    [ 1, 1, 2, 3, 3, 8, 5, 4, 10, 12, 15, 32 ],
    [ 1, 1, 2, 11, 3, 2, 5, 4, 6, 22, 10, 4, 15, 8, 30, 8 ],
    [ 1, 1, 2, 1, 3, 2, 4, 10, 5, 4, 6, 2, 10, 4, 12, 20, 15, 8, 30, 8 ],
    [ 1, 1, 2, 5, 3, 2, 4, 10, 5, 4, 6, 10, 12, 20, 15, 8 ],
    [ 1, 1, 2, 31, 3, 2, 5, 4, 6, 2, 10, 4, 15, 8, 30, 8 ],
    [ 1, 1, 2, 1, 3, 2, 4, 30, 5, 4, 6, 2, 10, 4, 15, 8, 30, 8 ],
    [ 1, 1, 2, 23, 3, 2, 5, 4, 6, 10, 10, 12, 15, 8 ],
    [ 1, 1, 2, 5, 3, 2, 4, 30, 5, 4, 6, 10, 15, 8 ],
    [ 1, 1, 2, 15, 3, 20, 5, 24 ] ];


#############################################################################
##
#F  GroupIdOps.Group64( <G> ) . . . . . . . . . . . . . . groups of order  64
##
GroupIdOps.Group64 := function( G )
    local   z1,  z2,  z3,  z4,  z5,  nr;

    # compute element orders
    z1 := Collected( List( Elements(G), x -> Order(G,x) ) );

    # abelian or nor abelian?
    if IsAbelian(G)  then z2 := 0;  else z2 := -1;  fi;

    # conjugacy classes
    z3 := List( Orbits( G, Elements(G) ), x -> [Length(x),Order(G,x[1])] );
    Sort(z3);

    # and squares
    z4 := GroupIdOps.Nr4Squares(G);
    z5 := GroupIdOps.Nr8Squares(G);

    # fingerprint
    z1 := Flat( Concatenation( z1, [z2], z3, z4, z5 ) );

    # look it up
    nr := Position( GroupIdOps.GroupList64, z1 );

    # handle various problem cases
    if nr = 23  then
        if GroupIdOps.Stable( G, 8, 5 ) = 0  then
            nr := 37;
        fi;
    elif nr = 26  then
        if GroupIdOps.Stable( G, 4, 3 ) = 0  then
            nr := 40;
        fi;
    elif nr = 31  then
        if GroupIdOps.Stable( G, 8, 5 ) = 0  then
            nr := 33;
        fi;
    elif nr = 39  then
        if GroupIdOps.Stable( G, 4, 3 ) = 2  then
            nr := 41;
        fi;
    elif nr = 50  then
        if GroupIdOps.Stable( G, 8, 3 ) = 0  then
            nr := 59;
        fi;
    elif nr = 87  then
        if Length(ConjugacyClassesSubgroups(G)) = 85  then
            nr := 88;
        fi;
    elif nr = 90  then
        if GroupIdOps.Stable2(G) = [ 2, 2, 4, 6, 6 ]  then
            nr := 92;
        fi;
    elif nr = 115  then
        if GroupIdOps.Stable( G, 4, 3 ) = 4  then
            nr := 116;
        fi;
    elif nr = 147  then
        if Length(ConjugacyClassesSubgroups(G)) = 93  then
            nr := 148;
        fi;
    elif nr = 165  then
        if GroupIdOps.Stable2(G) = [ 5, 6, 6 ]  then
            nr := 166;
        fi;
    elif nr = 183  then
        if Length(ConjugacyClassesSubgroups(G)) = 126  then
            nr := 184;
        fi;
    elif nr = 189  then
        z1 := GroupIdOps.Stable( G, 8, 3 );
        if z1  = 0  then
            nr := 193;
        elif z1 = 4  then
            nr := 198;
        fi;
    elif nr = 190  then
        if Length(ConjugacyClassesSubgroups(G)) = 61  then
            nr := 192;
        fi;
    elif nr = 191  then
        z1 := GroupIdOps.Stable( G, 8, 3 );
        if z1 = 0  then
            nr := 194;
        elif z1 = 4  then
            nr := 199;
        fi;
    elif nr = 203  then
        if GroupIdOps.Stable( G, 4, 3 ) = 4  then
            nr := 213;
        fi;
    elif nr = 208  then
        z1 := GroupIdOps.Stable2(G);
        if z1 = [ 2, 3, 4 ]  then
            nr := 209;
        elif z1 = [ 2, 2, 5 ]  then
            nr := 221;
        fi;
    elif nr = 211  then
        if GroupIdOps.Stable2(G) = [ 2, 4, 5 ]  then
            nr := 212;
        fi;
    elif nr = 210  then
        if GroupIdOps.Stable( G, 4, 3 ) = 7  then
            nr := 222;
        fi;
    elif nr = 235  then
        if GroupIdOps.Stable2(G) = [2,2,3]  then
            nr := 236;
        fi;
    fi;

    # and return
    return rec( catalogue := [ 64, nr ],
                names     := GroupIdOps.GroupName64[nr],
                size      := 64 );
end;

GroupIdOps.GroupName64 := [
    ["2^6"],["2^4x4"],["2^3x8"],["4^2x2^2"],["2^2x16"],["2x4x8"],["2x32"],
    ["4^3"],["4x16"],["8^2"],["64"],["2^3xD8"],["2^3xQ8"],["2^2xD8Y4"],[],
    [],[],["2x4xD8"],[],[],[],[],[],[],[],[],["4xD8Y4"],[],[],[],[],[],[],
    ["8xD8"],["8xQ8"],["16YD8"],[],[],[],[],[],[],["2^2xD16"],["2^2xQD16"],
    ["2^2xQ16"],["2xD16Y4"],[],[],[],[],[],[],[],[],["4xD16"],["4xQD16"],
    ["4xQ16"],["8YD16"],[],[],[],[],[],[],[],[],[],[],[],["2xQ8+Q8"],[],[],
    [],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
    [],[],[],[],[],[],[],["2xD8YD8"],["2xD8YQ8"],[],[],[],[],[],[],[],[],
    [],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
    ["2xD32"],["2xQD32"],["2xQ32"],[],[],[],[],[],[],[],[],[],[],[],[],[],
    [],[],[],[],["D8xD8"],["D8xQ8"],["Q8xQ8"],[],[],[],[],[],[],[],[],[],
    [],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
    [],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
    [],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
    [],[],[],[],[],[],["D8YD16"],["D8YQD16"],["Q8YD16"],[],[],[],[],[],[],
    [],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]];

GroupIdOps.GroupList64 := [
  [1,1,2,63,0,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
  1,2,1,2,1,2,1,2,1,2,1,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,4,16,16,16],[1,1,2,7,4,8,8,16,16,32,0,1,1,1,2,
  1,2,1,2,1,2,1,2,1,2,1,2,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,8,1,8,1,8,1,8,
  1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,16,1,16,1,16,1,16,1,16,
  1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,
  16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,8,8,8],[1,
  1,2,7,4,24,8,32,0,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,4,1,4,1,4,1,4,1,4,1,
  4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,
  4,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,
  8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,8,8,8,8,8,8,8],
  [1,1,2,3,4,4,8,8,16,16,32,32,0,1,1,1,2,1,2,1,2,1,4,1,4,1,4,1,4,1,8,1,8,
  1,8,1,8,1,8,1,8,1,8,1,8,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,
  16,1,16,1,16,1,16,1,16,1,16,1,16,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,
  1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,
  32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,4,4,4],[1,1,2,7,4,56,0,
  1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
  1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
  1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
  1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,8,8,8,8,8,8,8],[1,1,2,3,4,12,8,
  16,16,32,0,1,1,1,2,1,2,1,2,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,
  1,4,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,16,
  1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,
  16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,
  1,16,1,16,4,4,4,4,4,4,4],[1,1,2,3,4,12,8,48,0,1,1,1,2,1,2,1,2,1,4,1,4,1,
  4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,
  8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,
  8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,
  8,1,8,1,8,1,8,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],[1,1,2,1,4,2,8,4,16,8,32,16,
  64,32,0,1,1,1,2,1,4,1,4,1,8,1,8,1,8,1,8,1,16,1,16,1,16,1,16,1,16,1,16,1,
  16,1,16,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,
  1,32,1,32,1,32,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,
  64,1,64,1,64,1,64,1,64,1,64,1,64,1,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1,4,1,4,1,4,1,4,1,4,1,4,2,8,2,8,2,8,2,8,2,8,2,8,2,8,
  2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8,2,8,4,4,
  4,4,4,4,4,4,4,4,4,4,4,4,4],[1,1,2,3,4,12,8,16,16,32,-1,1,1,1,2,1,2,1,2,
  1,4,1,4,1,4,1,4,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,2,4,2,4,2,4,2,4,2,8,2,8,
  2,8,2,8,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,
  2,16,2,16,2,16,4,4,4,4,4,4,4],[1,1,2,7,4,8,8,16,16,32,-1,1,1,1,2,1,2,1,
  2,1,4,1,4,1,4,1,4,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,2,2,2,2,2,4,2,4,2,8,2,
  8,2,8,2,8,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,
  16,2,16,2,16,2,16,8,8,8],[1,1,2,3,4,12,8,16,16,32,-1,1,1,1,2,1,2,1,2,1,
  4,1,4,1,4,1,4,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,2,4,2,4,2,4,2,4,2,8,2,8,2,
  8,2,8,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,2,16,
  2,16,2,16,2,16,4,4,4,4,4,4,4],[1,1,2,3,4,4,8,8,16,16,32,32,-1,1,1,1,2,1,
  4,1,4,1,8,1,8,1,8,1,8,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,2,2,2,4,2,
  8,2,8,2,16,2,16,2,16,2,16,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,2,32,
  2,32,2,32,2,32,2,32,2,32,2,32,2,32,4,4,4],[1,1,2,39,4,8,8,16,-1,1,1,1,2,
  1,2,1,2,1,2,1,2,1,2,1,2,2,4,2,4,2,4,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2,32,2,32,16,2,16,4,18,2,2],[1,1,2,1,4,34,8,4,16,8,32,16,
  -1,1,1,1,2,2,4,2,8,2,8,2,16,2,16,2,16,2,16,2,32,2,32,2,32,2,32,2,32,2,32,
  2,32,2,32,16,4,16,4,34,2,2]];


#############################################################################
##
#F  GroupIdOps.Group66( <G> ) . . . . . . . . . . . . . . groups of order  66
##
GroupIdOps.Group66 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList66, x );

    # and return
    return rec( catalogue := [ 66, nr ],
                names     := GroupIdOps.GroupName66[nr],
                size      := 66 );
end;

GroupIdOps.GroupName66 := [
    [ "66" ], [ "D22x3" ], [ "S3x11" ], [ "D66" ] ];

GroupIdOps.GroupList66 := [
    [ 1, 1, 2, 1, 3, 2, 6, 2, 11, 10, 22, 10, 33, 20, 66, 20 ], 
    [ 1, 1, 2, 11, 3, 2, 6, 22, 11, 10, 33, 20 ], 
    [ 1, 1, 2, 3, 3, 2, 11, 10, 22, 30, 33, 20 ], 
    [ 1, 1, 2, 33, 3, 2, 11, 10, 33, 20 ] ];

#############################################################################
##
#F  GroupIdOps.Group70( <G> ) . . . . . . . . . . . . . . groups of order  70
##
GroupIdOps.Group70 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList70, x );

    # and return
    return rec( catalogue := [ 70, nr ],
                names     := GroupIdOps.GroupName70[nr],
                size      := 70 );
end;

GroupIdOps.GroupName70 := [
    [ "70" ], [ "D14x5" ], [ "D10x7" ], [ "D70" ] ];

GroupIdOps.GroupList70 := [
    [ 1, 1, 2, 1, 5, 4, 7, 6, 10, 4, 14, 6, 35, 24, 70, 24 ], 
    [ 1, 1, 2, 7, 5, 4, 7, 6, 10, 28, 35, 24 ], 
    [ 1, 1, 2, 5, 5, 4, 7, 6, 14, 30, 35, 24 ], 
    [ 1, 1, 2, 35, 5, 4, 7, 6, 35, 24 ] ];

#############################################################################
##
#F  GroupIdOps.Group72( <G> ) . . . . . . . . . . . . . . groups of order  72
##
GroupIdOps.Group72 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList72, x );

    # problem pair 36/47
    if nr = 36 and Length(DerivedSeries(G)) = 4  then
        nr := 47;
    fi;

    # and return
    return rec( catalogue := [ 72, nr ],
                names     := GroupIdOps.GroupName72[nr],
                size      := 72 );
end;

GroupIdOps.GroupName72 := [
    ["2^3x3^2"], ["2^3x9"], ["2x4x3^2"], ["2x4x9"], ["8x3^2"], ["72"],
    ["3^2xD8"], ["3^2xQ8"], ["9xD8"], ["9xQ8"], ["2x6xS3"], ["6x6.2"],
    ["12xS3"], ["3x12.2"], ["6xA4"], ["2x(2^2x3).3"], ["2^2x3^2:2"],
    ["2x(3^2x2).2"], ["4x3^2:2"], ["(4x3^2).2"], ["2^2xD18"], ["2x18.2"],
    ["4xD18"], ["36.2"], [], ["3xD24"], ["3xQ8+S3"], ["Sl(2,3)x3"], 
    ["(Q8x3).3"], ["3xS4"], ["2xS3^2"], ["S3x6.2"], ["(6.2)Y(6.2)"], 
    ["2x3^2:4"], ["(2x3^2).4"], [], ["S3+D24"], ["Q8+(3^2:2)"], [],
    ["D72"], ["Q8+D18"], [], [], [], [], ["S3xA4"], [], [], [], [] ];

GroupIdOps.GroupList72 := [
    # 72.2 - 72.5 swapped
    [ 1, 1, 2, 7, 3, 8, 6, 56 ],
    [ 1, 1, 2, 7, 3, 2, 6, 14, 9, 6, 18, 42 ],                     # 72.4
    [ 1, 1, 2, 3, 3, 8, 4, 4, 6, 24, 12, 32 ],                     # 72.2
    [ 1, 1, 2, 3, 3, 2, 4, 4, 6, 6, 9, 6, 12, 8, 18, 18, 36, 24 ], # 72.5
    [ 1, 1, 2, 1, 3, 8, 4, 2, 6, 8, 8, 4, 12, 16, 24, 32],         # 72.3
    [ 1, 1, 2, 1, 3, 2, 4, 2, 6, 2, 8, 4, 9, 6, 12, 4, 18,
      6, 24, 8, 36, 12, 72, 24 ],
    [ 1, 1, 2, 5, 3, 8, 4, 2, 6, 40, 12, 16 ],
    [ 1, 1, 2, 1, 3, 8, 4, 6, 6, 8, 12, 48 ],
    [ 1, 1, 2, 5, 3, 2, 4, 2, 6, 10, 9, 6, 12, 4, 18, 30, 36, 12 ],
    [ 1, 1, 2, 1, 3, 2, 4, 6, 6, 2, 9, 6, 12, 12, 18, 6, 36, 36 ],
    [ 1, 1, 2, 15, 3, 8, 6, 48 ],
    [ 1, 1, 2, 3, 3, 8, 4, 12, 6, 24, 12, 24 ],
    [ 1, 1, 2, 7, 3, 8, 4, 8, 6, 20, 12, 28 ],
    [ 1, 1, 2, 1, 3, 8, 4, 2, 6, 8, 8, 12, 12, 16, 24, 24 ],
    [ 1, 1, 2, 7, 3, 26, 6, 38 ],
    [ 1, 1, 2, 7, 3, 2, 6, 14, 9, 24, 18, 24 ],
    [ 1, 1, 2, 39, 3, 8, 6, 24 ],
    [ 1, 1, 2, 3, 3, 8, 4, 36, 6, 24 ],
    [ 1, 1, 2, 19, 3, 8, 4, 20, 6, 8, 12, 16 ],
    [ 1, 1, 2, 1, 3, 8, 4, 2, 6, 8, 8, 36, 12, 16 ],
    [ 1, 1, 2, 39, 3, 2, 6, 6, 9, 6, 18, 18 ],
    [ 1, 1, 2, 3, 3, 2, 4, 36, 6, 6, 9, 6, 18, 18 ],
    [ 1, 1, 2, 19, 3, 2, 4, 20, 6, 2, 9, 6, 12, 4, 18, 6, 36, 12 ],
    [ 1, 1, 2, 1, 3, 2, 4, 2, 6, 2, 8, 36, 9, 6, 12, 4, 18, 6, 36, 12 ],
    [ 1, 1, 2, 9, 3, 8, 4, 6, 6, 36, 12, 12 ],
    [ 1, 1, 2, 13, 3, 8, 4, 2, 6, 32, 12, 16 ],
    [ 1, 1, 2, 1, 3, 8, 4, 14, 6, 8, 12, 40 ],
    [ 1, 1, 2, 1, 3, 26, 4, 6, 6, 26, 12, 12 ],
    [ 1, 1, 2, 1, 3, 2, 4, 6, 6, 2, 9, 24, 12, 12, 18, 24 ],
    [ 1, 1, 2, 9, 3, 26, 4, 6, 6, 18, 12, 12 ],
    [ 1, 1, 2, 31, 3, 8, 6, 32 ],
    [ 1, 1, 2, 7, 3, 8, 4, 24, 6, 20, 12, 12 ],
    [ 1, 1, 2, 19, 3, 8, 4, 12, 6, 8, 12, 24 ],
    [ 1, 1, 2, 19, 3, 8, 4, 36, 6, 8 ],
    [ 1, 1, 2, 1, 3, 8, 4, 18, 6, 8, 8, 36 ],
    [ 1, 1, 2, 21, 3, 8, 4, 18, 6, 24 ],         # 72.36 as 72.47
    [ 1, 1, 2, 37, 3, 8, 4, 2, 6, 8, 12, 16 ],
    [ 1, 1, 2, 1, 3, 8, 4, 38, 6, 8, 12, 16 ],
    [ 1, 1, 2, 21, 3, 2, 4, 18, 6, 6, 9, 6, 18, 18 ],
    [ 1, 1, 2, 37, 3, 2, 4, 2, 6, 2, 9, 6, 12, 4, 18, 6, 36, 12 ],
    [ 1, 1, 2, 1, 3, 2, 4, 38, 6, 2, 9, 6, 12, 4, 18, 6, 36, 12 ],
    [ 1, 1, 2, 13, 3, 8, 4, 18, 6, 32 ],
    [ 1, 1, 2, 25, 3, 8, 4, 6, 6, 20, 12, 12 ],
    [ 1, 1, 2, 1, 3, 8, 4, 30, 6, 8, 12, 24 ],
    [ 1, 1, 2, 9, 3, 8, 4, 18, 8, 36 ],
    [ 1, 1, 2, 15, 3, 26, 6, 30 ],
    [ 1, 1, 2, 21, 3, 8, 4, 18, 6, 24 ],         # 72.47 as 72.36
    [ 1, 1, 2, 9, 3, 8, 4, 54 ],
    [ 1, 1, 2, 21, 3, 26, 4, 18, 6, 6 ],
    [ 1, 1, 2, 21, 3, 2, 4, 18, 6, 6, 9, 24 ] ];


#############################################################################
##
#F  GroupIdOps.Group75( <G> ) . . . . . . . . . . . . . . groups of order  75
##
GroupIdOps.Group75 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList75, x );

    # and return
    return rec( catalogue := [ 75, nr ],
                names     := GroupIdOps.GroupName75[nr],
                size      := 75 );
end;

GroupIdOps.GroupName75 := [
    [ "15x5" ], [ "75" ], [ "5^2:3" ] ];

GroupIdOps.GroupList75 := [
    [ 1, 1, 3, 2, 5, 24, 15, 48 ],
    [ 1, 1, 3, 2, 5, 4, 15, 8, 25, 20, 75, 40 ], 
    [ 1, 1, 3, 50, 5, 24 ] ];

#############################################################################
##
#F  GroupIdOps.Group78( <G> ) . . . . . . . . . . . . . . groups of order  78
##
GroupIdOps.Group78 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList78, x );

    # and return
    return rec( catalogue := [ 78, nr ],
                names     := GroupIdOps.GroupName78[nr],
                size      := 78 );
end;

GroupIdOps.GroupName78 := [
    ["78"], ["3xD26"], ["2x13:3"], ["13xS3"], ["13:6"], ["D78"] ];

GroupIdOps.GroupList78 := [
    [ 1, 1, 2, 1, 3, 2, 6, 2, 13, 12, 26, 12, 39, 24, 78, 24 ], 
    [ 1, 1, 2, 13, 3, 2, 6, 26, 13, 12, 39, 24 ], 
    [ 1, 1, 2, 1, 3, 26, 6, 26, 13, 12, 26, 12 ], 
    [ 1, 1, 2, 3, 3, 2, 13, 12, 26, 36, 39, 24 ], 
    [ 1, 1, 2, 13, 3, 26, 6, 26, 13, 12 ], 
    [ 1, 1, 2, 39, 3, 2, 13, 12, 39, 24 ] ];

#############################################################################
##
#F  GroupIdOps.Group80( <G> ) . . . . . . . . . . . . . . groups of order  80
##
GroupIdOps.Group80 := function( G )
    local   z1,  z2,  z3,  nr,  tmp;

    # look up element orders in group list
    z1 := Collected( List( Elements(G), x -> Order(G,x) ) );

    # abelian or nor abelian?
    if IsAbelian(G)  then z2 := 1;  else z2 := 0;  fi;

    # length of conjugacy classes
    # List(ConjugacyClasses(G),x->[Size(x),Order(G,Representative(x))])
    z3 := List( Orbits( G, Elements(G) ), x -> [Length(x),Order(G,x[1])] );
    z3 := Collected(z3);
    Sort(z3);

    # look up the group pattern
    nr := Position( GroupIdOps.GroupList80, Flat([z1,z2,z3]) );

    # problem pair 7/10, 80.7=[12], 80.10=[4,8] see 48.??
    if nr = 7  then
        if GroupIdOps.Nr4Squares(G) = [4,8]  then
            nr := 10;
        fi;
    fi;

    # problem triple 29/32/33, 80.29=[44], 80.32=[20,24], 80.33=[4,40]
    if nr = 29  then
        tmp := GroupIdOps.Nr4Squares(G);
        if tmp = [20,24]  then
            nr := 32;
        elif tmp = [4,40]  then
            nr := 33;
        fi;
    fi;

    # and return
    return rec( catalogue := [ 80, nr ],
                names     := GroupIdOps.GroupName80[nr],
                size      := 80 );
end;

GroupIdOps.GroupName80 := [
    ["2^4x5"], ["2^2x20"], ["8x10"], ["4^2x5"], ["80"], ["10xD8"], 
    ["10xQ8"], ["5xD8Y4"], [], ["5x(2x4).2"], [], ["5xD16"], ["5xQD16"],
    ["5xQ16"], ["2^3xD10"], ["4xD20"], ["2^2x10.2"], ["4x10.2"], ["8xD10"],
    ["2x20.2"], ["40.2"], ["2^2x5:4"], ["4x5:4"], ["2x10.4"], ["4Y(10.4)"],
    ["20.4"], [], ["2xD40"], ["2xQ8+D10"], [], [], [], ["(10.2)+Q8"],
    ["D40Y4"], [], [], ["D8xD10"], ["Q8xD10"], ["(10.2)YD8"], ["(10.2)YQ8"],
    [], ["(5:4)+Q8"], [], [], [], [], [], [], ["D80"], [], [], ["2^4:5"] ];

GroupIdOps.GroupList80 := [
    [1,1,2,15,5,4,10,60,1,1,1,1,1,2,15,1,5,4,1,10,60],
    [1,1,2,7,4,8,5,4,10,28,20,32,1,1,1,1,1,2,7,1,4,8,1,5,4,1,10,28,1,20,32],
    [1,1,2,3,4,4,5,4,8,8,10,12,20,16,40,32,1,1,1,1,1,2,3,1,4,4,1,5,4,1,8,8,
     1,10,12,1,20,16,1,40,32],
    [1,1,2,3,4,12,5,4,10,12,20,48,1,1,1,1,1,2,3,1,4,12,1,5,4,1,10,12,1,20,48],
    [1,1,2,1,4,2,5,4,8,4,10,4,16,8,20,8,40,16,80,32,1,1,1,1,1,2,1,1,4,2,1,5,
     4,1,8,4,1,10,4,1,16,8,1,20,8,1,40,16,1,80,32],
    [1,1,2,11,4,4,5,4,10,44,20,16,0,1,1,1,1,2,3,1,5,4,1,10,12,2,2,4,2,4,2,2,
     10,16,2,20,8],
    [1,1,2,3,4,12,5,4,10,12,20,48,0,1,1,1,1,2,3,1,5,4,1,10,12,2,4,6,2,20,24],
    [1,1,2,7,4,8,5,4,10,28,20,32,0,1,1,1,1,2,1,1,4,2,1,5,4,1,10,4,1,20,8,2,
     2,3,2,4,3,2,10,12,2,20,12],
    [1,1,2,7,4,8,5,4,10,28,20,32,0,1,1,1,1,2,3,1,5,4,1,10,12,2,2,2,2,4,4,2,
     10,8,2,20,16],
    [1,1,2,3,4,12,5,4,10,12,20,48,0,1,1,1,1,2,3,1,5,4,1,10,12,2,4,6,2,20,24],
    [1,1,2,3,4,4,5,4,8,8,10,12,20,16,40,32,0,1,1,1,1,2,1,1,4,2,1,5,4,1,10,4,
     1,20,8,2,2,1,2,4,1,2,8,4,2,10,4,2,20,4,2,40,16],
    [1,1,2,9,4,2,5,4,8,4,10,36,20,8,40,16,0,1,1,1,1,2,1,1,5,4,1,10,4,2,4,1,2,
     8,2,2,20,4,2,40,8,4,2,2,4,10,8],
    [1,1,2,5,4,6,5,4,8,4,10,20,20,24,40,16,0,1,1,1,1,2,1,1,5,4,1,10,4,2,4,1,
     2,8,2,2,20,4,2,40,8,4,2,1,4,4,1,4,10,4,4,20,4],
    [1,1,2,1,4,10,5,4,8,4,10,4,20,40,40,16,0,1,1,1,1,2,1,1,5,4,1,10,4,2,4,1,
     2,8,2,2,20,4,2,40,8,4,4,2,4,20,8],
    [1,1,2,47,5,4,10,28,0,1,1,1,1,2,7,2,5,2,2,10,14,5,2,8],
    [1,1,2,23,4,24,5,4,10,12,20,16,0,1,1,1,1,2,3,1,4,4,2,5,2,2,10,6,2,20,8,
     5,2,4,5,4,4],
    [1,1,2,7,4,40,5,4,10,28,0,1,1,1,1,2,7,2,5,2,2,10,14,5,4,8],
    [1,1,2,3,4,44,5,4,10,12,20,16,0,1,1,1,1,2,3,1,4,4,2,5,2,2,10,6,2,20,8,5,
     4,8],
    [1,1,2,11,4,12,5,4,8,24,10,4,20,8,40,16,0,1,1,1,1,2,1,1,4,2,1,8,4,2,5,2,
     2,10,2,2,20,4,2,40,8,5,2,2,5,4,2,5,8,4],
    [1,1,2,3,4,4,5,4,8,40,10,12,20,16,0,1,1,1,1,2,3,1,4,4,2,5,2,2,10,6,2,20,
     8,5,8,8],
    [1,1,2,1,4,2,5,4,8,4,10,4,16,40,20,8,40,16,0,1,1,1,1,2,1,1,4,2,1,8,4,2,
     5,2,2,10,2,2,20,4,2,40,8,5,16,8],
    [1,1,2,23,4,40,5,4,10,12,0,1,1,1,1,2,3,4,5,1,4,10,3,5,2,4,5,4,8],
    [1,1,2,11,4,52,5,4,10,4,20,8,0,1,1,1,1,2,1,1,4,2,4,5,1,4,10,1,4,20,2,5,
     2,2,5,4,10],
    [1,1,2,3,4,20,5,4,8,40,10,12,0,1,1,1,1,2,3,4,5,1,4,10,3,5,4,4,5,8,8],
    [1,1,2,11,4,12,5,4,8,40,10,4,20,8,0,1,1,1,1,2,1,1,4,2,4,5,1,4,10,1,4,20,
     2,5,2,2,5,4,2,5,8,8],
    [1,1,2,1,4,2,5,4,8,20,10,4,16,40,20,8,0,1,1,1,1,2,1,1,4,2,4,5,1,4,10,1,
     4,20,2,5,8,4,5,16,8],
    [1,1,2,27,4,20,5,4,10,28,0,1,1,1,1,2,3,2,2,2,2,5,2,2,10,14,10,2,2,10,4,2],
    [1,1,2,43,4,4,5,4,10,12,20,16,0,1,1,1,1,2,3,2,4,2,2,5,2,2,10,6,2,20,8,
     10,2,4],
    [1,1,2,3,4,44,5,4,10,12,20,16,0,1,1,1,1,2,3,2,4,2,2,5,2,2,10,6,2,20,8,
     10,4,4],
    [1,1,2,7,4,40,5,4,10,28,0,1,1,1,1,2,3,2,2,2,2,5,2,2,10,14,10,4,4],
    [1,1,2,23,4,24,5,4,10,12,20,16,0,1,1,1,1,2,3,2,4,2,2,5,2,2,10,6,2,20,8,
     10,2,2,10,4,2],
    [1,1,2,3,4,44,5,4,10,12,20,16,0,1,1,1,1,2,3,2,4,2,2,5,2,2,10,6,2,20,8,
     10,4,4],
    [1,1,2,3,4,44,5,4,10,12,20,16,0,1,1,1,1,2,3,2,4,2,2,5,2,2,10,6,2,20,8,
     10,4,4],
    [1,1,2,23,4,24,5,4,10,12,20,16,0,1,1,1,1,2,1,1,4,2,2,2,1,2,4,1,2,5,2,2,
     10,6,2,20,8,10,2,2,10,4,2],
    [1,1,2,3,4,4,5,4,8,40,10,12,20,16,0,1,1,1,1,2,1,1,4,2,2,2,1,2,4,1,2,5,2,
     2,10,6,2,20,8,10,8,4],
    [1,1,2,11,4,12,5,4,8,24,10,4,20,8,40,16,0,1,1,1,1,2,1,1,4,2,2,5,2,2,8,2,
     2,10,2,2,20,4,2,40,8,10,2,1,10,4,1,10,8,2],
    [1,1,2,35,4,12,5,4,10,20,20,8,0,1,1,1,1,2,1,2,2,2,2,4,1,2,5,2,2,10,2,4,
     10,4,4,20,2,5,2,2,10,2,2,10,4,1],
    [1,1,2,11,4,36,5,4,10,4,20,24,0,1,1,1,1,2,1,2,4,3,2,5,2,2,10,2,4,20,6,5,
     2,2,10,4,3],
    [1,1,2,15,4,32,5,4,10,20,20,8,0,1,1,1,1,2,1,2,2,2,2,4,1,2,5,2,2,10,2,4,
     10,4,4,20,2,5,4,2,10,2,1,10,4,2],
    [1,1,2,31,4,16,5,4,10,4,20,24,0,1,1,1,1,2,1,2,4,3,2,5,2,2,10,2,4,20,6,5,
     4,2,10,2,3],
    [1,1,2,23,4,40,5,4,10,12,0,1,1,1,1,2,1,2,2,1,4,5,1,4,10,3,5,2,2,10,2,1,
     10,4,4],
    [1,1,2,11,4,52,5,4,10,4,20,8,0,1,1,1,1,2,1,2,4,1,4,5,1,4,10,1,4,20,2,5,
     2,2,10,4,5],
    [1,1,2,3,4,20,5,4,8,40,10,12,0,1,1,1,1,2,1,2,2,1,4,5,1,4,10,3,5,4,2,10,
     4,1,10,8,4],
    [1,1,2,11,4,12,5,4,8,40,10,4,20,8,0,1,1,1,1,2,1,2,4,1,4,5,1,4,10,1,4,20,
     2,5,4,2,10,2,1,10,8,4],
    [1,1,2,25,4,2,5,4,8,20,10,20,20,8,0,1,1,1,1,2,1,2,4,1,2,5,2,2,10,2,4,2,
     1,4,10,4,4,20,2,10,8,2,20,2,1],
    [1,1,2,5,4,22,5,4,8,20,10,20,20,8,0,1,1,1,1,2,1,2,4,1,2,5,2,2,10,2,4,2,
     1,4,10,4,4,20,2,10,8,2,20,4,1],
    [1,1,2,21,4,6,5,4,8,20,10,4,20,24,0,1,1,1,1,2,1,2,4,1,2,5,2,2,10,2,4,4,
     1,4,20,6,10,8,2,20,2,1],
    [1,1,2,1,4,26,5,4,8,20,10,4,20,24,0,1,1,1,1,2,1,2,4,1,2,5,2,2,10,2,4,4,
     1,4,20,6,10,8,2,20,4,1],
    [1,1,2,41,4,2,5,4,8,4,10,4,20,8,40,16,0,1,1,1,1,2,1,2,4,1,2,5,2,2,8,2,2,
     10,2,2,20,4,2,40,8,20,2,2],
    [1,1,2,21,4,22,5,4,8,4,10,4,20,8,40,16,0,1,1,1,1,2,1,2,4,1,2,5,2,2,8,2,
     2,10,2,2,20,4,2,40,8,20,2,1,20,4,1],
    [1,1,2,1,4,42,5,4,8,4,10,4,20,8,40,16,0,1,1,1,1,2,1,2,4,1,2,5,2,2,8,2,2,
     10,2,2,20,4,2,40,8,20,4,2],
    [1,1,2,15,5,64,0,1,1,1,5,2,3,16,5,4]];


#############################################################################
##
#F  GroupIdOps.Group81( <G> ) . . . . . . . . . . . . . . groups of order  81
##
GroupIdOps.Group81 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList81, x );

    # problem pair 1/6, 81.1 is abelian,  81.6 is not
    if nr = 1 and not IsAbelian(G)  then
        nr := 6;
    fi;

    # problem pair 3/11, 81.3 is abelian,  81.11 is not
    if nr = 3 and not IsAbelian(G)  then
        nr := 11;
    fi;

    # problem triple 4/9/15, check conjugacy classes
    if nr = 4 and not IsAbelian(G)  then
        if Length(ConjugacyClasses(G))=33  then
            nr := 9;
        else
            nr := 15;
        fi;
    fi;

    # problem tuple 2/7/8/10/14, check conjugacy classes
    if nr = 2 and not IsAbelian(G)  then
        if   Length(NormalSubgroups(G)) = 32 then nr :=  7;
        elif Length(NormalSubgroups(G)) = 14 then nr :=  8;
        elif Length(NormalSubgroups(G)) = 29 then nr := 10;
        else nr := 14;
        fi;
    fi;

    # and return
    return rec( catalogue := [ 81, nr ],
                names     := GroupIdOps.GroupName81[nr],
                size      := 81 );
end;

GroupIdOps.GroupName81 := [
    ["3^4"], ["3^2x9"], ["27x3"], ["9^2"], ["81"], ["3x3^3:3"], ["3x9:3"],
    [], [], ["(3^2:3)Y9"], ["27:3"], ["3$3"], [], [], [] ];

GroupIdOps.GroupList81 := [
    [ 1, 1, 3, 80 ], 
    [ 1, 1, 3, 26, 9, 54 ], 
    [ 1, 1, 3, 8, 9, 18, 27, 54 ],     # 81.4 in catalogue
    [ 1, 1, 3, 8, 9, 72 ],             # 81.3 in catalogue
    [ 1, 1, 3, 2, 9, 6, 27, 18, 81, 54 ], 
    [ 1, 1, 3, 80 ], 
    [ 1, 1, 3, 26, 9, 54 ], 
    [ 1, 1, 3, 26, 9, 54 ], 
    [ 1, 1, 3, 8, 9, 72 ], 
    [ 1, 1, 3, 26, 9, 54 ], 
    [ 1, 1, 3, 8, 9, 18, 27, 54 ],
    [ 1, 1, 3, 44, 9, 36 ], 
    [ 1, 1, 3, 62, 9, 18 ], 
    [ 1, 1, 3, 26, 9, 54 ],
    [ 1, 1, 3, 8, 9, 72 ] ];


#############################################################################
##
#F  GroupIdOps.Group84( <G> ) . . . . . . . . . . . . . . groups of order  84
##
GroupIdOps.Group84 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList84, x );

    # and return
    return rec( catalogue := [ 84, nr ],
                names     := GroupIdOps.GroupName84[nr],
                size      := 84 );
end;

GroupIdOps.GroupName84 := [
    ["2^2x21"], ["84"], ["14xS3"], ["7x6.2"], ["A4x7"], ["D14x6"],
    ["14.2x3"], ["2^2x7:3"], ["4x7:3"], ["2x7:6"], ["(14.2):3"],
    ["D84"], ["42.2"], ["S3xD14"], ["A4+(7:3)"] ];

GroupIdOps.GroupList84 := [
    [ 1, 1, 2, 3, 3, 2, 6, 6, 7, 6, 14, 18, 21, 12, 42, 36 ],
    [ 1, 1, 2, 1, 3, 2, 4, 2, 6, 2, 7, 6, 12, 4, 14, 6, 21, 12, 28,
      12, 42, 12,84, 24 ],
    [ 1, 1, 2, 7, 3, 2, 6, 2, 7, 6, 14, 42, 21, 12, 42, 12 ],
    [ 1, 1, 2, 1, 3, 2, 4, 6, 6, 2, 7, 6, 14, 6, 21, 12, 28, 36, 42, 12 ],
    [ 1, 1, 2, 3, 3, 8, 7, 6, 14, 18, 21, 48 ],
    [ 1, 1, 2, 15, 3, 2, 6, 30, 7, 6, 14, 6, 21, 12, 42, 12 ],
    [ 1, 1, 2, 1, 3, 2, 4, 14, 6, 2, 7, 6, 12, 28, 14, 6, 21, 12, 42, 12 ],
    [ 1, 1, 2, 3, 3, 14, 6, 42, 7, 6, 14, 18 ],
    [ 1, 1, 2, 1, 3, 14, 4, 2, 6, 14, 7, 6, 12, 28, 14, 6, 28, 12 ],
    [ 1, 1, 2, 15, 3, 14, 6, 42, 7, 6, 14, 6 ],
    [ 1, 1, 2, 1, 3, 14, 4, 14, 6, 14, 7, 6, 12, 28, 14, 6 ],
    [ 1, 1, 2, 43, 3, 2, 6, 2, 7, 6, 14, 6, 21, 12, 42, 12 ],
    [ 1, 1, 2, 1, 3, 2, 4, 42, 6, 2, 7, 6, 14, 6, 21, 12, 42, 12 ],
    [ 1, 1, 2, 31, 3, 2, 6, 14, 7, 6, 14, 18, 21, 12 ],
    [ 1, 1, 2, 3, 3, 56, 7, 6, 14, 18 ] ];


#############################################################################
##
#F  GroupIdOps.Group88( <G> ) . . . . . . . . . . . . . . groups of order  88
##
GroupIdOps.Group88 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList88, x );

    # and return
    return rec( catalogue := [ 88, nr ],
                names     := GroupIdOps.GroupName88[nr],
                size      := 88 );
end;

GroupIdOps.GroupName88 := [
    ["2^3x11"], ["2x44"], ["88"], ["11xD8"], ["11xQ8"], ["2xD44"],
    ["4xD22"], ["2x22.2"], ["44.2"], [], ["D88"], ["Q8+D22"] ];

GroupIdOps.GroupList88 := [
    [ 1, 1, 2, 7, 11, 10, 22, 70 ],
    [ 1, 1, 2, 3, 4, 4, 11, 10, 22, 30, 44, 40 ],
    [ 1, 1, 2, 1, 4, 2, 8, 4, 11, 10, 22, 10, 44, 20, 88, 40 ],
    [ 1, 1, 2, 5, 4, 2, 11, 10, 22, 50, 44, 20 ],
    [ 1, 1, 2, 1, 4, 6, 11, 10, 22, 10, 44, 60 ],
    [ 1, 1, 2, 47, 11, 10, 22, 30 ],
    [ 1, 1, 2, 23, 4, 24, 11, 10, 22, 10, 44, 20 ],
    [ 1, 1, 2, 3, 4, 44, 11, 10, 22, 30 ],
    [ 1, 1, 2, 1, 4, 2, 8, 44, 11, 10, 22, 10, 44, 20 ],
    [ 1, 1, 2, 25, 4, 22, 11, 10, 22, 30 ],
    [ 1, 1, 2, 45, 4, 2, 11, 10, 22, 10, 44, 20 ],
    [ 1, 1, 2, 1, 4, 46, 11, 10, 22, 10, 44, 20 ] ];


#############################################################################
##
#F  GroupIdOps.Group90( <G> ) . . . . . . . . . . . . . . groups of order  90
##
GroupIdOps.Group90 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList90, x );

    # and return
    return rec( catalogue := [ 90, nr ],
                names     := GroupIdOps.GroupName90[nr],
                size      := 90 );
end;

GroupIdOps.GroupName90 := [
    ["3x30"], ["90"], ["15xS3"], ["5x3^2:2"], ["5xD18"], ["3^2xD10"],
    ["9xD10"], ["3xD30"], ["(3^2x5):2"], ["D90"] ];

GroupIdOps.GroupList90 := [
    [ 1, 1, 2, 1, 3, 8, 5, 4, 6, 8, 10, 4, 15, 32, 30, 32 ],
    [ 1, 1, 2, 1, 3, 2, 5, 4, 6, 2, 9, 6, 10, 4, 15, 8, 18, 6, 30,
      8, 45, 24, 90, 24 ],
    [ 1, 1, 2, 3, 3, 8, 5, 4, 6, 6, 10, 12, 15, 32, 30, 24 ],
    [ 1, 1, 2, 9, 3, 8, 5, 4, 10, 36, 15, 32 ],
    [ 1, 1, 2, 9, 3, 2, 5, 4, 9, 6, 10, 36, 15, 8, 45, 24 ],
    [ 1, 1, 2, 5, 3, 8, 5, 4, 6, 40, 15, 32 ],
    [ 1, 1, 2, 5, 3, 2, 5, 4, 6, 10, 9, 6, 15, 8, 18, 30, 45, 24 ],
    [ 1, 1, 2, 15, 3, 8, 5, 4, 6, 30, 15, 32 ],
    [ 1, 1, 2, 45, 3, 8, 5, 4, 15, 32 ],
    [ 1, 1, 2, 45, 3, 2, 5, 4, 9, 6, 15, 8, 45, 24 ] ];


#############################################################################
##
#F  GroupIdOps.Group96( <G> ) . . . . . . . . . . . . . . groups of order  96
##
GroupIdOps.Group96 := function( G )
    local   z1,  z3,  nr,  z2;

    # look up element orders in group list
    z1 := Collected( List( Elements(G), x -> Order(G,x) ) );

    # abelian or not abelian?
    if IsAbelian(G)  then z2 := 1;  else z2 := 0;  fi;

    # length of conjugacy classes
    # List(ConjugacyClasses(G),x->[Size(x),Order(G,Representative(x))])
    z3 := List( Orbits( G, Elements(G) ), x -> [Length(x),Order(G,x[1])] );
    z3 := Collected(z3);
    Sort(z3);

    # loop up group pattern
    nr := Position( GroupIdOps.GroupList96, Flat([z1,z2,z3]) );

    # for problem cases use squares
    if nr in [30,31,32,35,50,51,53,62,78,79,80,94,95,97,98,99,101,
              102,139,140,150,166,215]
    then
        z1 := GroupIdOps.GroupSquares96[nr];

        # squares of elements of order 4 or 8
        if z1[1] = 4  then
            z2 := GroupIdOps.Nr4Squares(G);
        else
            z2 := GroupIdOps.Nr8Squares(G);
        fi;
        z3 := Position( z1[3], z2 );
        nr := z1[2][z3];
    fi;

    # and return
    return rec( catalogue := [ 96, nr ],
                names     := GroupIdOps.GroupName96[nr],
                size      := 96 );
end;

GroupIdOps.GroupName96 := [
    ["2^5x3"], ["2^3x12"], ["2^2x24"], ["6x4^2"], ["2x48"], ["4x24"],
    ["96"], ["#96.01a"], ["#96.01b"], ["#96.01c"], 
    ["#96.02a"], ["#96.02b"], ["#96.02c"], ["#96.03a"], ["#96.03b"], 
    ["#96.03c"], ["#96.04a"], ["#96.04b"], ["#96.04c"], ["#96.05a"], 
    ["#96.05b"], ["#96.06a"], ["#96.06b"], ["#96.07a"], ["#96.008"], 
    ["#96.08a"], ["#96.08b"], ["#96.08c"], ["#96.08d"], ["#96.009"], 
    ["#96.09a"], ["#96.09b"], ["#96.09c"], ["#96.09d"], ["#96.09e"], 
    ["#96.010"], ["#96.10a"], ["#96.10b"], ["#96.10c"], ["#96.10d"], 
    ["#96.10e"], ["#96.011"], ["#96.11a"], ["#96.11b"], ["#96.11c"], 
    ["#96.012"], ["#96.12a"], ["#96.12b"], ["#96.12c"], ["#96.013"], 
    ["#96.13a"], ["#96.13b"], ["#96.13c"], ["#96.014"], ["#96.14a"], 
    ["#96.14b"], ["#96.14c"], ["#96.14d"], ["#96.14e"], ["#96.015"], 
    ["#96.15a"], ["#96.15b"], ["#96.15c"], ["#96.15d"], ["#96.016"], 
    ["#96.16a"], ["#96.16b"], ["#96.16c"], ["#96.16d"], ["#96.017"], 
    ["#96.17a"], ["#96.17b"], ["#96.17c"], ["#96.17d"], ["#96.018"], 
    ["#96.18a"], ["#96.18b"], ["#96.019"], ["#96.19a"], ["#96.19b"], 
    ["#96.020"], ["#96.20a"], ["#96.20b"], ["#96.021"], ["#96.21a"], 
    ["#96.21b"], ["#96.022"], ["#96.22a"], ["#96.22b"], ["#96.023"], 
    ["#96.23a"], ["#96.23b"], ["#96.23c"], ["#96.024"], ["#96.24a"], 
    ["#96.24b"], ["#96.24c"], ["#96.24d"], ["#96.025"], ["#96.25a"], 
    ["#96.25b"], ["#96.25c"], ["#96.026"], ["#96.26a"], ["#96.26b"], 
    ["#96.26c"], ["#96.26d"], ["#96.26e"], ["#96.027"], ["#96.27a"], 
    ["#96.27b"], ["#96.27c"], ["#96.028"], ["#96.28a"], ["#96.28b"], 
    ["#96.28c"], ["#96.029"], ["#96.29a"], ["#96.29b"], ["#96.030"], 
    ["#96.30a"], ["#96.30b"], ["#96.031"], ["#96.31a"], ["#96.31b"], 
    ["#96.31c"], ["#96.032"], ["#96.32a"], ["#96.32b"], ["#96.033"], 
    ["#96.33a"], ["#96.33b"], ["#96.33c"], ["#96.33d"], ["#96.034"], 
    ["#96.34a"], ["#96.34b"], ["#96.34c"], ["#96.035"], ["#96.35b"], 
    ["#96.35c"], ["#96.036"], ["#96.36a"], ["#96.36b"], ["#96.36c"], 
    ["#96.36d"], ["#96.36e"], ["#96.037"], ["#96.37a"], ["#96.37b"], 
    ["#96.37c"], ["#96.37d"], ["#96.37e"], ["#96.038"], ["#96.38a"], 
    ["#96.38b"], ["#96.38c"], ["#96.38d"], ["#96.38e"], ["#96.039"], 
    ["#96.39a"], ["#96.39b"], ["#96.39c"], ["#96.39d"], ["#96.040"], 
    ["#96.40a"], ["#96.40b"], ["#96.40c"], ["#96.041"], ["#96.41a"], 
    ["#96.41b"], ["#96.41c"], ["#96.41d"], ["#96.042"], ["#96.42a"], 
    ["#96.42b"], ["#96.42c"], ["#96.42d"], ["#96.043"], ["#96.43a"], 
    ["#96.43b"], ["#96.43c"], ["#96.044"], ["#96.44a"], ["#96.44b"], 
    ["#96.44c"], ["#96.44d"], ["#96.44e"], ["#96.045"], ["#96.45a"], 
    ["#96.45b"], ["#96.45c"], ["#96.45d"], ["#96.45e"], ["#96.046"], 
    ["#96.46a"], ["#96.46b"], ["#96.047"], ["#96.47a"], ["#96.47b"], 
    ["#96.048"], ["#96.48a"], ["#96.48b"], ["#96.049"], ["#96.49a"], 
    ["#96.49b"], ["#96.050"], ["#96.50a"], ["#96.50b"], ["#96.50c"], 
    ["#96.051"], ["#96.51a"], ["#96.51b"], ["#96.052"], ["#96.053"], 
    ["#96.054"], ["#96.055"], ["#96.056"], ["#96.057"], ["#96.058"], 
    ["#96.059"], ["#96.060"], ["#96.061"], ["#96.062"], ["#96.063"], 
    ["#96.064"], ["#96.065"], ["#96.066"], ["#96.067"], ["#96.068"], 
    ["#96.35a"] ];

GroupIdOps.GroupList96 := [
[1,1,2,31,3,2,6,62,1,1,1,1,1,2,31,1,3,2,1,6,62],[1,1,2,15,3,2,4,16,
6,30,12,32,1,1,1,1,1,2,15,1,3,2,1,4,16,1,6,30,1,12,32],[1,1,2,7,3,2,4,8,6,14,
8,16,12,16,24,32,1,1,1,1,1,2,7,1,3,2,1,4,8,1,6,14,1,8,16,1,12,16,1,24,32],[1,
1,2,7,3,2,4,24,6,14,12,48,1,1,1,1,1,2,7,1,3,2,1,4,24,1,6,14,1,12,48],[1,1,2,
3,3,2,4,4,6,6,8,8,12,8,16,16,24,16,48,32,1,1,1,1,1,2,3,1,3,2,1,4,4,1,6,6,1,8,
8,1,12,8,1,16,16,1,24,16,1,48,32],[1,1,2,3,3,2,4,12,6,6,8,16,12,24,24,32,1,1,
1,1,1,2,3,1,3,2,1,4,12,1,6,6,1,8,16,1,12,24,1,24,32],[1,1,2,1,3,2,4,2,6,2,8,
4,12,4,16,8,24,8,32,16,48,16,96,32,1,1,1,1,1,2,1,1,3,2,1,4,2,1,6,2,1,8,4,1,
12,4,1,16,8,1,24,8,1,32,16,1,48,16,1,96,32],[1,1,2,63,3,2,6,30,0,1,1,1,1,2,
15,2,3,1,2,6,15,3,2,16],[1,1,2,31,3,8,6,56,0,1,1,1,1,2,7,3,2,8,4,3,2,4,6,14],
[1,1,2,31,3,32,6,32,0,1,1,1,1,2,1,3,2,10,16,3,2,16,6,2],[1,1,2,31,3,2,4,32,
6,14,12,16,0,1,1,1,1,2,7,1,4,8,2,3,1,2,6,7,2,12,8,3,2,8,3,4,8],[1,1,2,15,3,
2,4,48,6,30,0,1,1,1,1,2,15,2,3,1,2,6,15,3,4,16],[1,1,2,15,3,8,4,16,6,24,12,
32,0,1,1,1,1,2,3,1,4,4,3,2,4,3,4,4,4,3,2,4,6,6,4,12,8],[1,1,2,15,3,2,4,48,6,
6,12,24,0,1,1,1,1,2,3,1,4,12,2,3,1,2,6,3,2,12,12,3,2,4,3,4,12],[1,1,2,7,3,2,
4,56,6,14,12,16,0,1,1,1,1,2,7,1,4,8,2,3,1,2,6,7,2,12,8,3,4,16],[1,1,2,7,3,32,
4,24,6,32,0,1,1,1,1,2,1,3,2,2,3,4,8,16,3,2,16,6,2],[1,1,2,15,3,2,4,16,6,6,8,
32,12,8,24,16,0,1,1,1,1,2,3,1,4,4,1,8,8,2,3,1,2,6,3,2,12,4,2,24,8,3,2,4,3,4,
4,3,8,8],[1,1,2,7,3,2,4,8,6,14,8,48,12,16,0,1,1,1,1,2,7,1,4,8,2,3,1,2,6,7,2,
12,8,3,8,16],[1,1,2,7,3,8,4,8,6,8,8,16,12,16,24,32,0,1,1,1,1,2,1,1,4,2,1,8,
4,3,2,2,3,4,2,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4,2,24,4,2,48,8,24,2,2],[1,
1,2,33,3,2,4,2,6,18,8,4,12,4,16,24,24,8,0,1,1,1,1,2,1,2,3,1,2,4,1,2,6,1,
2,8,2,4,12,1,4,24,2,6,16,4,8,2,1,8,6,2,24,2,1],[1,1,2,9,3,2,4,10,6,18,8,
4,12,20,16,8,24,8,48,16,0,1,1,1,1,2,1,1,3,2,1,6,2,2,4,1,2,8,2,2,12,2,2,
16,4,2,24,4,2,48,8,8,2,1,8,4,1,8,6,2,8,12,2],[1,1,2,25,3,2,4,26,6,2,8,4,
12,4,16,8,24,8,48,16,0,1,1,1,1,2,1,2,3,1,2,4,1,2,6,1,2,8,2,2,12,2,2,16,
4,2,24,4,2,48,8,24,2,1,24,4,1],[1,1,2,9,3,2,4,26,6,18,8,4,12,4,16,24,24,
8,0,1,1,1,1,2,1,2,3,1,2,4,1,2,6,1,2,8,2,4,12,1,4,24,2,6,16,4,8,2,1,8,6,
2,24,4,1],[1,1,2,25,3,2,4,10,6,2,8,4,12,20,16,24,24,8,0,1,1,1,1,2,1,2,3,
1,2,4,1,2,6,1,2,8,2,4,12,1,4,24,2,6,16,4,8,4,1,8,12,2,24,2,1],[1,1,2,1,
3,2,4,18,6,2,8,4,12,36,16,8,24,8,48,16,0,1,1,1,1,2,1,1,3,2,1,6,2,2,4,1,
2,8,2,2,12,2,2,16,4,2,24,4,2,48,8,8,4,2,8,12,4],[1,1,2,1,3,2,4,50,6,2,8,
4,12,4,16,8,24,8,48,16,0,1,1,1,1,2,1,2,3,1,2,4,1,2,6,1,2,8,2,2,12,2,2,16,
4,2,24,4,2,48,8,24,4,2],[1,1,2,1,3,2,4,34,6,2,8,4,12,20,16,24,24,8,0,1,
1,1,1,2,1,2,3,1,2,4,1,2,6,1,2,8,2,4,12,1,4,24,2,6,16,4,8,4,1,8,12,2,24,
4,1],[1,1,2,27,3,8,4,12,6,24,8,24,0,1,1,1,1,2,3,6,4,2,6,8,4,8,3,1,8,6,3,
12,2,2],[1,1,2,3,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,1,1,1,2,3,3,2,4,6,2,4,6,4,4,8,3,1,
8,6,3],[1,1,2,15,3,8,4,48,6,24,0,1,1,1,1,2,3,3,2,4,6,4,8,8,3,1,8,6,3],[1,
1,2,27,3,8,4,36,6,24,0,1,1,1,1,2,1,2,2,1,3,2,2,6,2,1,8,3,1,8,6,3,12,2,1,
12,4,3],[1,1,2,27,3,32,4,36,0,1,1,1,3,2,3,6,2,1,12,2,1,12,4,3,32,3,1],[1,
1,2,3,3,2,4,60,6,6,12,24,0,1,1,1,1,2,3,2,3,1,2,4,6,2,6,3,2,12,12,12,4,4]];

GroupIdOps.GroupSquares96:=[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
[4,[30,46,75],[[24],[8,16],[8,8,8]]],
[4,[31,47,49,76],[[56],[8,48],[24,32],[8,24,24]]],
[4,[32,48],[[48],[16,32]]],,,
[4,[35,77],[[24],[8,8,8]]],,,,,,,,,,,,,,,
[8,[50,81],[[8,8],[4,4,4,4]]],
[8,[51,82],[[16,16],[4,4,12,12]]],,
[8,[53,83],[[24,24],[12,12,12,12]]],,,,,,,,,
[4,[62,63],[[12,12,36],[12,20,28]]],,,,,,,,,,,,,,,,
[8,[78,84],[[4,4,4,4],[8,8]]],
[8,[79,86],[[4,4,12,12],[16,16]]],
[8,[80,85],[[12,12,12,12],[24,24]]],,,,,,,,,,,,,,
[4,[94,109],[[12],[4,8]]],
[4,[95,110],[[28],[4,24]]],,
[4,[97,111],[[28],[4,24]]],
[4,[98,112],[[12],[4,8]]],
[4,[99,113,117,120],[[20],[8,12],[4,16],[4,8,8]]],,
[4,[101,114,118,121],[[52],[24,28],[4,48],[4,24,24]]],
[4,[102,115,116,119,122],[[36],[12,24],[8,28],
[4,32],[4,8,24]]],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
[4,[139,165],[[4,4,20],[4,12,12]]],
[4,[140,141,167,168],
[[12,12,36],[4,12,44],[4,20,36],[12,20,28]]],,,,,,,,,,
[4,[150,151,153],[[24,24],[8,40],[16,32]]],,,,,,,,,,,,,,,,
[4,[166,231],[[4,28,28],[4,4,52]]],
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
[4,[215,216],[[36],[12,24]]]];


#############################################################################
##
#F  GroupIdOps.Group98( <G> ) . . . . . . . . . . . . . . groups of order  98
##
GroupIdOps.Group98 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList98, x );

    # and return
    return rec( catalogue := [ 98, nr ],
                names     := GroupIdOps.GroupName98[nr],
                size      := 98 );
end;

GroupIdOps.GroupName98 := [
    [ "14x7" ], [ "98" ], [ "D98" ], [ "7xD14" ], [ "7^2:2" ] ];

GroupIdOps.GroupList98 := [
    [ 1, 1, 2, 1, 7, 48, 14, 48 ],
    [ 1, 1, 2, 1, 7, 6, 14, 6, 49, 42, 98, 42 ], 
    [ 1, 1, 2, 49, 7, 6, 49, 42 ],
    [ 1, 1, 2, 7, 7, 48, 14, 42 ], 
    [ 1, 1, 2, 49, 7, 48 ] ];

#############################################################################
##
#F  GroupIdOps.Group100( <G> )  . . . . . . . . . . . . . groups of order 100
##
GroupIdOps.Group100 := function( G )
    local   x,  nr;

    # look up element orders in group list
    x  := Flat( Collected( List( Elements(G), y -> Order(G,y) ) ) );
    nr := Position( GroupIdOps.GroupList100, x );

    # problem pair 13/14,  100.13 = 10,  100.14 = 6
    if nr = 13 and Length(NormalSubgroups(G)) = 6  then
        nr := 14;
    fi;

    # and return
    return rec( catalogue := [ 100, nr ],
                names     := GroupIdOps.GroupName100[nr],
                size      := 100 );
end;

GroupIdOps.GroupName100 := [
    ["10^2"], ["50x2"], ["5x20"], ["100"], ["10xD10"], ["5x10.2"], 
    ["5x5:4"], ["2x5^2:2"], ["(5^2x2).2"], ["D100"], ["50.2"], 
    ["D10^2"], [], [], [], ["25:4"] ];

GroupIdOps.GroupList100 := [
    [ 1, 1, 2, 3, 5, 24, 10, 72 ],
    [ 1, 1, 2, 3, 5, 4, 10, 12, 25, 20, 50, 60 ],   # 100.3
    [ 1, 1, 2, 1, 4, 2, 5, 24, 10, 24, 20, 48 ],    # 100.2
    [ 1, 1, 2, 1, 4, 2, 5, 4, 10, 4, 20, 8, 25, 20, 50, 20, 100, 40 ],
    [ 1, 1, 2, 11, 5, 24, 10, 64 ],
    [ 1, 1, 2, 1, 4, 10, 5, 24, 10, 24, 20, 40 ],
    [ 1, 1, 2, 5, 4, 10, 5, 24, 10, 20, 20, 40 ],
    [ 1, 1, 2, 51, 5, 24, 10, 24 ],
    [ 1, 1, 2, 1, 4, 50, 5, 24, 10, 24 ],
    [ 1, 1, 2, 51, 5, 4, 10, 4, 25, 20, 50, 20 ],
    [ 1, 1, 2, 1, 4, 50, 5, 4, 10, 4, 25, 20, 50, 20 ],
    [ 1, 1, 2, 35, 5, 24, 10, 40 ],
    [ 1, 1, 2, 25, 4, 50, 5, 24 ],     # 100.13 looks like 100.14
    [ 1, 1, 2, 25, 4, 50, 5, 24 ],
    [ 1, 1, 2, 5, 4, 50, 5, 24, 10, 20 ],
    [ 1, 1, 2, 25, 4, 50, 5, 4, 25, 20 ] ];


#############################################################################
##
#F  GroupIdOps.GroupPQ( <G> ) . . . . . . . .  non-abelian groups of order pq
##
GroupIdOps.GroupPQ := function( G )
    local   n,  name,  p;

    # if size is 6,  it S3 = D6
    n := Size(G);
    p := Factors(n);
    if n = 6  then
        name := [ "D6", "S3" ];

    # p = 2  call our group "D_pq"
    elif n mod 2 = 0  then
        name := [ Concatenation( "D", StringInt(n) ) ];
        if IsPrimePowerInt(n/2+1)  then
            Add( name, Concatenation( "O+_2(", StringInt(n/2+1), ")" ) );
        fi;
        if IsPrimePowerInt(n/2-1)  then
            Add( name, Concatenation( "O-_2(", StringInt(n/2-1), ")" ) );
        fi;

    # otherwise call it "q:p"
    else
        name := [ Concatenation( StringInt(p[2]), ":", StringInt(p[1]) ) ];
    fi;

    # this is always the second group in the catalogue (cyclic is first)
    List( name, IsString );
    return rec( catalogue := [ n, 2 ],
                size      := n,
                3primes   := [ "D", p[1], p[2] ],
                 names     := name );

end;


#############################################################################
##
#F  GroupIdOps.GroupP3( <G> ) . . . . . . . . non-abelian groups of order p^3
##
GroupIdOps.GroupP3 := function( G )
    local   p,  nr,  type, names;

    # get prime
    p := Factors(Size(G))[1];

    # at least p^2+1 elements of order p
    if NrElementsOfOrder( G, p ) > p^2  then
        nr   := 4;
        type := [ "A", p ];
    else
        nr   := 5;
        type := [ "B", p ];
    fi;

    # set name for small cases
    if p = 2 and nr = 4  then
        names := [ "D8" ];
    elif p = 2 and nr = 5  then
        names := [ "Q8" ];
    elif p = 3 and nr = 4  then
        names := [ "3^2:3" ];
    elif p = 3 and nr = 5  then
        names := [ "9:3" ];
    else
        names := [];
    fi;

    # and return
    return rec( catalogue := [ p^3, nr ],
                names     := names,
                3primes   := type,
                size      := p^3 );

end;


#############################################################################
##
#F  GroupIdOps.GroupP2Q( <G> )  . . . . non-abelian groups of order p^2q, p<q
##
GroupIdOps.GroupP2Q := function( G )
    local   n,  p,  q,  c1,  cp1,  cq1,  cp2,  cq2,  cp3,  nr,  names,  type,
            pn,  qn;

    # get primes
    n := Size(G);
    p := Factors(n);
    q := p[3];
    p := p[1];

    # p | q-1
    if (q-1) mod p = 0  then

        # check the various conjugacy classes
        c1  := GroupIdOps.NrClasses( G, 1, p );
        cp1 := GroupIdOps.NrClasses( G, p, q );
        cq1 := GroupIdOps.NrClasses( G, q, p );
        cp2 := GroupIdOps.NrClasses( G, p, p*q );
        cq2 := GroupIdOps.NrClasses( G, q, p^2 );
        cp3 := GroupIdOps.NrClasses( G, p^2, q );
        if c1=p-1 and cp1=(q-1)/p and cq1=(p-1)*p and cp2=(p-1)*(q-1)/p  then
            nr := 3;
        elif c1=p-1 and cp1=(q-1)/p and cq2=p^2-p and cp2=(p-1)*(q-1)/p  then
            nr := 4;
        elif cq1=p-1 and cp3=(q-1)/p^2 and cq2 = p^2-p  then
            nr := 5;
        elif n = 12 and NrElementsOfOrder(G,3) = 8  then
            nr := 5;
        else
            Error( "you have encountered a bug" );
        fi;
    else
        Error( "you have encountered a bug" );
    fi;

    # get name for small groups
    names := [];
    if n <= 100 and IsBound(GroupIdOps.GroupNamesP2Q[n])  then
        names := ShallowCopy(GroupIdOps.GroupNamesP2Q[n][nr]);
    fi;
    pn := String(p);
    qn := String(q);
    if nr = 3  then
        Add( names, Concatenation( "D(", pn, ",", qn, ")x", pn ) );
        type := [ "D", p, q, p ];
    elif nr = 4  then
        Add( names, Concatenation( "G(", pn, "^2,", qn, ")" ) );
        type := [ "G", p, q ];
    elif nr = 5  and n <> 12  then
        Add( names, Concatenation( "H(", pn, "^2,", qn, ")" ) );
        type := [ "H", p, q ];
    fi;
    List( names, IsString );

    # and return
    if IsBound(type)  then
        return rec( catalogue := [ n, nr ],
                    names     := names,
                    3primes   := type,
                    size      := n );
    else
        return rec( catalogue := [ n, nr ],
                    names     := names,
                    size      := n );
    fi;
end;

GroupIdOps.GroupNamesP2Q := [];
GroupIdOps.GroupNamesP2Q[12] := [,,["D12"],["6.2"],["A4"] ];
GroupIdOps.GroupNamesP2Q[20] := [,,["D20"],["10.2"],["5:4"] ];
GroupIdOps.GroupNamesP2Q[28] := [,,["D28"],["14.2"] ];
GroupIdOps.GroupNamesP2Q[44] := [,,["D44"],["22.2"] ];
GroupIdOps.GroupNamesP2Q[52] := [,,["D52"],["26.2"],["13:4"] ];
GroupIdOps.GroupNamesP2Q[63] := [,,["7:3x3"],["21.3"] ];
GroupIdOps.GroupNamesP2Q[68] := [,,["D68"],["34.2"],["17:4"] ];
GroupIdOps.GroupNamesP2Q[76] := [,,["D76"],["38.2"] ];
GroupIdOps.GroupNamesP2Q[92] := [,,["D92"],["46.2"] ];


#############################################################################
##
#F  GroupIdOps.GroupPQ2( <G> )  . . . . non-abelian groups of order pq^2, p<q
##
GroupIdOps.GroupPQ2 := function( G )
    local   n,  p,  q,  cat,  name,  lat,  A,  B,  C,  AC,  x,  
            PO,  BC,  s,  qn,  pn,  syl,  nor,  non;

    # get primes
    n := Size(G);
    p := Factors(n);
    q := p[3];  qn := String(q);
    p := p[1];  pn := String(p);

    # p | q-1
    if (q-1) mod p = 0  then

        # check the various conjugacy classes
        if GroupIdOps.NrClasses( G, q, p ) = p-1  then
            cat  := [ "D", p, q, q ];
            name := Concatenation( "D(", pn, ",", qn, ")x", qn );
        elif GroupIdOps.NrClasses( G, p, q ) = (q-1)/p  then
            cat  := [ "M", p, q ];
            name := Concatenation( "M(", pn, ",", qn, "^2)" );
        else
            # lat := ConjugacyClassesSubgroups(G);
            # lat := Filtered( lat, t -> Size(Representative(t)) = q );
            # if 1 = Length(Set(List(lat,t->Size(t))))  then

            syl := SylowSubgroup( G, q );
            lat := List( ConjugacyClassesSubgroups(syl), Representative );
            lat := Filtered( lat, t -> Size(t) = q );
            nor := [];
            non := [];
            x   := 1;
            while x <= Length(lat) and 0 = Length(non) and Length(nor) < 3 do
                if IsNormal( G, lat[x] )  then
                    Add( nor, lat[x] );
                else
                    Add( non, lat[x] );
                fi;
                x := x + 1;
            od;
            if 0 = Length(non) and 2 < Length(nor)  then
                cat  := [ "K", p, q ];
                name := Concatenation( "K(", pn, ",", qn, "^2)" );
            else
                while x <= Length(lat) and Length(nor) < 2  do
                    if IsNormal( G, lat[x] )  then
                        Add( nor, lat[x] );
                    fi;
                    x := x + 1;
                od;
                A  := nor[1].generators[1];
                B  := nor[2].generators[1];
                C  := SylowSubgroup( G, p ).generators[1];
                AC := A^C;
                x  := 1;
                PO := A^0;
                while PO <> AC  do
                    x := x+1;
                    if x^p mod q = 1  then
                        PO := A^x;
                    fi;
                od;
                BC := B^C;
                s  := 1;
                PO := B^0;
                while s < q and PO <> BC  do
                    s := s+1;
                    if s mod p <> 0 and s mod p <> 1  then
                        PO := B^((x^s) mod q);
                    fi;
                od;
                s := s mod p;
                if ((1/s) mod p) < s  then s := (1/s) mod p;  fi;
                cat  := [ "L", p, q, s ];
                x    := String(s);
                name := Concatenation( "L(", pn, ",", qn, "^2,", x, ")" );
            fi;
        fi;

    # p | q+1, p <> 2
    elif p <> 2 and (q+1) mod p = 0  then
        cat  := [ "N", p, q ];
        name := Concatenation( "N(", pn, ",", qn, "^2)" );

    # this should not happen
    else
        Error( "you have encountered a bug" );
    fi;
    IsString(name);

    # and return
    return rec( 3primes := cat, names := [name], size := n );
end;


#############################################################################
##
#F  GroupIdOps.GroupPQR( <G> )  . . .  non-abelian groups of order pqr, p<q<r
##
GroupIdOps.GroupPQR := function( G )
    local   n,  p,  r,  q,  s1,  s2,  s3,  syl,  nor,  cat,  name,  C,  
            A,  AC,  PO,  s,  x,  B,  y,  BC,  names;

    # get primes
    n := Size(G);
    p := Factors(n);
    r := p[3];
    q := p[2];
    p := p[1];

    # compute the sylow subgroups
    s1  := SylowSubgroup( G, r );
    s2  := SylowSubgroup( G, q );
    s3  := SylowSubgroup( G, p );
    syl := [ s1, s2, s3 ];
    nor := Number( syl, t -> IsNormal(G,t) );

    # two normal sylow subgroup: Dpqxr or Gpqr(s)
    if nor = 2  then
        s1  := First( syl, t -> not IsNormal(G,t) );
        syl := Filtered( syl, t -> t <> s1 );
        s2  := Closure( s1, syl[1] );
        s3  := Closure( s1, syl[2] );

        # one product non-normal: Dpqxr
        syl := Filtered( [s2,s3], t -> IsNormal(G,t) );
        if 1 = Length(syl)  then
            p := Size(s1);
            q := Size(syl[1])/p;
            r := n/(p*q);
            if (q-1) mod p <> 0  then
                Error( "you have encountered a bug" );
            fi;
            cat  := [ "D", p, q, r ];
            name := Concatenation( "D(", String(p), ",", String(q), ")x",
                                   String(r) );

        # both non-normal: Gpqr(s)
        else
            p := Size(s1);
            q := Size(s2)/p;
            r := Size(s3)/p;
            if r < q  then x := r; r := q; q := x;  fi;
            if q = r or q = p or p = r  then
                Error( "you have encountered a bug" );
            fi;
            if (q-1) mod p <> 0  then
                Error( "you have encountered a bug" );
            fi;
            if (r-1) mod p <> 0  then
                Error( "you have encountered a bug" );
            fi;

            # find <A> and <C>
            C  := SylowSubgroup(G,p).generators[1];
            A  := SylowSubgroup(G,r).generators[1];
            AC := A^C;
            PO := A^0;
            s  := 1;
            while AC <> PO  do
                s := s+1;
                if s mod r <> 1 and s^p mod r = 1  then
                    PO := A^s;
                fi;
            od;

            # correct <C>
            x := First( [2..r-1], t -> t mod r <> 1 and t^p mod r = 1 );
            s := LogMod( x, s, r );
            C := C^s;

            # now find <B>
            B  := SylowSubgroup(G,q).generators[1];
            BC := B^C;
            PO := B^0;
            s  := 1;
            while BC <> PO  do
                s := s+1;
                if s mod r <> 1 and s^p mod r = 1  then
                    PO := B^s;
                fi;
            od;

            # and find <s>
            y := First( [2..q-1], t -> t mod q <> 1 and t^p mod q = 1 );
            s := LogMod( s, y, q );

            # construct a name
            cat  := [ "G", p, q, r, s ];
            name := Concatenation( "G(", String(p), ",", String(q),
                                   ",", String(r), ",", String(s), ")" );
            
        fi;

    # one normal sylow subgroup: Hpqr
    elif nor = 1  then
        cat  := [ "H", p, q, r ];
        name := Concatenation( "H(", String(p), ",", String(q), ",",
                               String(r), ")" );

    # this should not happen
    else
        Error( "you have encountered a bug" );
    fi;

    # get name for small groups
    names := [];
    Add( names, name );
    List( names, IsString );

    # and return
    return rec( 3primes := cat, names := names, size := n );
end;


#############################################################################
##
#F  GroupIdOps.AbelianGroup1( <G> ) . . . . . . . abelian groups of order   p
##
GroupIdOps.AbelianGroup1 := function( G )
    local   n;

    n := Size(G);
    return rec( catalogue := [ n, 1 ],
                size      := n,
                names     := [ StringInt(n) ] );

end;


#############################################################################
##
#F  GroupIdOps.AbelianGroup2( <G> ) . . . . . . . abelian groups of order  pq
##
GroupIdOps.AbelianGroup2 := function( G )
    local   n,  p,  s,  cat,  inv,  name;

    # get the order
    n := Size(G);
    p := Factors(n);
    s := List( p, StringInt );

    # if p1 <> p2 then <G> must be cyclic
    if p[1] <> p[2]  then
        cat  := [ n, 1 ];
        inv  := [ n ];
        name := [ StringInt(n), Concatenation(s[1],"x",s[2]) ];

    # p^2 has catalogue number 2
    elif IsCyclic(G)  then
        cat  := [ n, 2 ];
        inv  := [ n ];
        name := [ StringInt(n) ];
        
    # p x p has catalogue number 1
    else
        cat  := [ n, 1 ];
        inv  := [ p[1], p[2] ];
        name := [ Concatenation(s[1],"x",s[2]) ];
    fi;

    # and return
    List( name, IsString );
    return rec( catalogue := cat,
                size      := n,
                names     := name );

end;


#############################################################################
##
#F  GroupIdOps.AbelianGroup3( <G> ) . . . . . . . abelian groups of order pqr
##
GroupIdOps.AbelianGroup3 := function( G )
    local   i,  n,  p,  s,  d,  inv,  cat,  name;

    # get the order
    n := Size(G);
    p := Factors(n);
    s := List( p, StringInt );
    d := Set(p);

    # compute the abelian invariants
    inv := AbelianInvariants(G);

    # p x p x p has catalogue number 1
    if Length(d) = 1 and Length(inv) = 3  then
        cat  := [ n, 1 ];
        name := [ Concatenation(s[1],"x",s[2],"x",s[3]) ];

    # p x p^2 has catalogue number 2
    elif Length(d) = 1 and Length(inv) = 2  then
        cat  := [ n, 2 ];
        name := [ Concatenation(s[1],"x",StringInt(p[2]*p[3])) ];

    # p^3 has catalogue number 3
    elif Length(d) = 1 and Length(inv) = 1  then
        cat  := [ n, 3 ];
        name := [ StringInt(n) ];

    # p x p x q has catalogue number 1
    elif Length(d) = 2 and Length(inv) = 3  then
        cat := [ n, 1 ];
        if p[1] = p[2]  then i := 3;  else i := 1;  fi;
        name := [ Concatenation(s[2],"x",s[2],"x",s[i]),
                  Concatenation(s[2],"x",StringInt(p[2]*p[i])) ];

    # p^2 x q has catalogue number 2
    elif Length(d) = 2 and Length(inv) = 2  then
        cat := [ n, 2 ];
        if p[1] = p[2]  then i := 3;  else i := 1;  fi;
        name := [ Concatenation(StringInt(p[2]^2),"x",s[i]),
                  StringInt(p[2]^2*p[i]) ];

    # p x q x r has catalogue number 1
    else
        cat  := [ n, 1 ];
        name := [ StringInt(n), Concatenation(s[1],"x",s[2],"x",s[3]) ];
    fi;

    # and return
    List( name, IsString );
    return rec( catalogue := cat,
                size      := n,
                names     := name );

end;


#############################################################################
##
#F  GroupIdOps.AbelianPGroup( <G> ) . . . . . . . . .  abelian 2- or 3-groups
##
GroupIdOps.AbelianPGroup := function( G )
    local   n,  inv,  p;

    # check size
    n := Size(G);
    if not IsBound(GroupIdOps.AbelianPGroups[n])  then
        Error( "<G> must be an abelian p-group of order at least 128" );
    fi;

    # compute the abelian invariants
    inv := AbelianInvariants(G);
    Sort(inv);

    # and look them up
    p := First( GroupIdOps.AbelianPGroups[n], x -> x[1] = inv );

    # and return
    return rec( size      := n,
                pGroupId  := p[2] );
    
end;


#############################################################################
##
#F  GroupIdOps.2Group( <G> )  . . . . . . . . .  2-group of order at most 256
##
GroupIdOps.2Group := function ( G )
    local   size,  sp,  enc,  total,  name,  i;

    # check the size
    size := Size(G);
    if not size in [2,4,8,16,32,64,128,256]  then
        Error("<size> must be a power of 2 at most 256");
    fi;

    # compute the standard presentation of <G>
    sp := StandardPresentation( FpGroup(G), 2, "ClassBound", 8 );

    # and encode it
    enc := EncodedStandardPresentation( sp, 2 );

    # find the file
    total := 0;
    for name  in RecFields(TGParts)  do
        if size in TGParts.(name).sizes  then
            TGLoad( TGParts.(name) );
            for i  in [ 1 .. TGParts.(name).number ]  do
                if TGParts.(name).groups[i] = enc  then
                    return rec( size     := size,
                                pGroupId := i+total );
                fi;
            od;
            total := total + TGParts.(name).number;
        fi;
    od;

    # if we end here something is wrong
    Error( "cannot find <enc> in 2-group library" );
end;


#############################################################################
##
#F  GroupIdOps.3Group( <G> )  . . . . . . . . .  3-group of order at most 729
##
GroupIdOps.3Group := function ( G )
    local   size,  sp,  enc,  total,  name,  i;

    # check the size
    size := Size(G);
    if not size in [3,9,27,81,243,729]  then
        Error("<size> must be a power of 3 at most 729");
    fi;

    # compute the standard presentation of <G>
    sp := StandardPresentation( FpGroup(G), 3, "ClassBound", 6 );

    # and encode it
    enc := EncodedStandardPresentation( sp, 3 );

    # find the file
    total := 0;
    for name  in RecFields(ThGParts)  do
        if size in ThGParts.(name).sizes  then
            ThGLoad( ThGParts.(name) );
            for i  in [ 1 .. ThGParts.(name).number ]  do
                if ThGParts.(name).groups[i] = enc  then
                    return rec( size     := size,
                                pGroupId := i+total );
                fi;
            od;
            total := total + ThGParts.(name).number;
        fi;
    od;

    # if we end here something is wrong
    Error( "cannot find <enc> in 3-group library" );
end;


#############################################################################
##
#V  GroupIdOps.NrSolvableGroups . . . . . number of sovable groups of order n
##
GroupIdOps.NrSolvableGroups := [
  1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2,
  1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2,
  1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 12, 1, 2, 4, 267, 1, 4, 1, 5, 1,
  4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4,
  2, 2, 1, 231, 1, 5, 2, 16 ];



#############################################################################
##
#F  GroupId( <group> )  . . . . . . . . . . . . . . . . find the catalogue id
##
GroupId := function( G )
    if not IsBound(G.groupId)  then
        if not IsBound(G.operations.GroupId)  then
            G.groupId := GroupOps.GroupId(G);
        else
            G.groupId := G.operations.GroupId(G);
        fi;
    fi;
    return G.groupId;
end;

GroupOps.GroupId := function( G )
    local   n,  p,  result,  anupq;

    # get the size of <G> and the prime factors
    n := Size(G);
    p := Factors(n);

    # check if n is too big and has more than three primes (doesn't work)
    anupq := [128,256,243,729];
    if n > 100 and not n in anupq and Length(p) > 3  then
        Error( "size of <G> must be less than 101 or a product of ",
               "at most 3 primes" );
    fi;
    if n in anupq and not IsAbelian(G) and StandardPresentation = 0  then
        Error( "the ANU pq is required for 2- and 3-groups" );
    fi;
    
    # handle abelian groups first
    if IsAbelian(G)  then

        # for some order only one group of this order exsists (namely n)
        if n < 100 and GroupIdOps.NrSolvableGroups[n] = 1  then
            result := rec( catalogue := [ n, 1 ],
                           names     := [ StringInt(n) ],
                           size      := n );

        # cases with at most 3 primes
        elif Length(p) = 1  then
            result := GroupIdOps.AbelianGroup1(G);
        elif Length(p) = 2  then
            result := GroupIdOps.AbelianGroup2(G);
        elif Length(p) = 3  then
            result := GroupIdOps.AbelianGroup3(G);

        # handle other cases
        elif n = 16  then
            result := GroupIdOps.Group16(G);
        elif n = 24  then
            result := GroupIdOps.Group24(G);
        elif n = 32  then
            result := GroupIdOps.Group32(G);
        elif n = 36  then
            result := GroupIdOps.Group36(G);
        elif n = 40  then
            result := GroupIdOps.Group40(G);
        elif n = 48  then
            result := GroupIdOps.Group48(G);
        elif n = 54  then
            result := GroupIdOps.Group54(G);
        elif n = 56  then
            result := GroupIdOps.Group56(G);
        elif n = 60  then
            result := GroupIdOps.Group60(G);
        elif n = 64  then
            result := GroupIdOps.Group64(G);
        elif n = 72  then
            result := GroupIdOps.Group72(G);
        elif n = 80  then
            result := GroupIdOps.Group80(G);
        elif n = 81  then
            result := GroupIdOps.Group81(G);
        elif n = 84  then
            result := GroupIdOps.Group84(G);
        elif n = 88  then
            result := GroupIdOps.Group88(G);
        elif n = 90  then
            result := GroupIdOps.Group90(G);
        elif n = 96  then
            result := GroupIdOps.Group96(G);
        elif n = 100  then
            result := GroupIdOps.Group100(G);
        elif n in anupq  then
            result := GroupIdOps.AbelianPGroup(G);

        # return only the abelian invariants
        else
            result := rec( size := n );
        fi;

        # add the abelian invariants and return
        result.abelianInvariants := AbelianInvariants(G);

        # if it is a p group check if know the number
        if IsPrimePowerInt(n) and IsBound(GroupIdOps.PGroups[n])  then
            result.pGroupId := GroupIdOps.PGroups[n][result.catalogue[2]];
        fi;

        # and return
        return result;

    # non-abelian groups of order p*q
    elif Length(p) = 2  then
        result := GroupIdOps.GroupPQ(G);

    # non-abelian groups of types: p^3, p^2*q, q*p*r
    elif Length(p) = 3  then

        # type: p^3
        if p[1] = p[2] and p[2] = p[3]  then
            result := GroupIdOps.GroupP3(G);

        # type: p^2*q, p < q
        elif p[1] = p[2] and p[2] <> p[3]  then
            result := GroupIdOps.GroupP2Q(G);

        # type: p*q^2, p < q 
        elif 100 < n and p[1] <> p[2] and p[2] = p[3]  then
            result := GroupIdOps.GroupPQ2(G);

        # type: p*q*r
        elif 100 < n and p[1]<>p[2] and p[2]<>p[3]  then
            result := GroupIdOps.GroupPQR(G);

        # catch small cases missed above
        elif n = 18  then
            result := GroupIdOps.Group18(G);
        elif n = 50  then
            result := GroupIdOps.Group50(G);
        elif n = 75  then
            result := GroupIdOps.Group75(G);
        elif n = 98  then
            result := GroupIdOps.Group98(G);
        elif n = 30  then
            result := GroupIdOps.Group30(G);
        elif n = 42  then
            result := GroupIdOps.Group42(G);
        elif n = 66  then
            result := GroupIdOps.Group66(G);
        elif n = 70  then
            result := GroupIdOps.Group70(G);
        elif n = 78  then
            result := GroupIdOps.Group78(G);
        fi;

    # other small cases
    elif n = 16  then
        result := GroupIdOps.Group16(G);
    elif n = 24  then
        result := GroupIdOps.Group24(G);
    elif n = 32  then
        result := GroupIdOps.Group32(G);
    elif n = 36  then
        result := GroupIdOps.Group36(G);
    elif n = 40  then
        result := GroupIdOps.Group40(G);
    elif n = 48  then
        result := GroupIdOps.Group48(G);
    elif n = 54  then
        result := GroupIdOps.Group54(G);
    elif n = 56  then
        result := GroupIdOps.Group56(G);
    elif n = 60  then
        result := GroupIdOps.Group60(G);
    elif n = 64  then
        result := GroupIdOps.Group64(G);
    elif n = 72  then
        result := GroupIdOps.Group72(G);
    elif n = 80  then
        result := GroupIdOps.Group80(G);
    elif n = 81  then
        result := GroupIdOps.Group81(G);
    elif n = 84  then
        result := GroupIdOps.Group84(G);
    elif n = 88  then
        result := GroupIdOps.Group88(G);
    elif n = 90  then
        result := GroupIdOps.Group90(G);
    elif n = 96 then
        result := GroupIdOps.Group96(G);
    elif n = 100  then
        result := GroupIdOps.Group100(G);
    elif n in anupq and p[1] = 2  then
        result := GroupIdOps.2Group(G);
    elif n in anupq and p[1] = 3  then
        result := GroupIdOps.3Group(G);
    fi;

    # if it is a p group check if know the number
    if not IsBound(result.pGroupId) and IsBound(GroupIdOps.PGroups[n])  then
        result.pGroupId := GroupIdOps.PGroups[n][result.catalogue[2]];
        result.pGroupId := ShallowCopy(result.pGroupId);
    fi;

    # if the order is a product of at most three primes check '3primes'
    if not IsBound(result.3primes) and IsBound(GroupIdOps.3primes[n])  then
        result.3primes := GroupIdOps.3primes[n][result.catalogue[2]];
        result.3primes := ShallowCopy(result.3primes);
    fi;

    # and return
    return result;

end;
